#include "base/functional/bind.h"
#include "build/build_config.h"
#include "cc/layers/solid_color_layer.h"
#include "cc/layers/texture_layer.h"
#include "cc/test/fake_picture_layer.h"
#include "cc/test/fake_picture_layer_impl.h"
#include "cc/test/layer_tree_pixel_test.h"
#include "cc/test/solid_color_content_layer_client.h"
#include "cc/test/test_layer_tree_frame_sink.h"
#include "cc/trees/layer_tree_impl.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
#include "components/viz/common/frame_sinks/copy_output_result.h"
#include "components/viz/test/buildflags.h"
#include "components/viz/test/paths.h"
#include "gpu/command_buffer/client/raster_interface.h"
#if !BUILDFLAG(IS_ANDROID)
namespace cc {
namespace {
enum class TestReadBackType { … };
struct ReadbackTestConfig { … };
const char* ReadbackTypeTestSuffix(TestReadBackType type) { … }
void PrintTo(const ReadbackTestConfig& config, std::ostream* os) { … }
class LayerTreeHostReadbackPixelTest
: public LayerTreePixelTest,
public testing::WithParamInterface<ReadbackTestConfig> { … };
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackRootLayer) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackRootLayerWithChild) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackNonRootLayer) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackSmallNonRootLayer) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackSmallNonRootLayerWithChild) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackSubtreeSurroundsTargetLayer) { … }
TEST_P(LayerTreeHostReadbackPixelTest,
ReadbackSubtreeExtendsBeyondTargetLayer) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackHiddenSubtree) { … }
TEST_P(LayerTreeHostReadbackPixelTest,
HiddenSubtreeNotVisibleWhenDrawnForReadback) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackSubrect) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackNonRootLayerSubrect) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackWhenNoDamage) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackOutsideViewportWhenNoDamage) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackNonRootLayerOutsideViewport) { … }
TEST_P(LayerTreeHostReadbackPixelTest, ReadbackNonRootOrFirstLayer) { … }
TEST_P(LayerTreeHostReadbackPixelTest, MultipleReadbacksOnLayer) { … }
ReadbackTestConfig const kTestConfigs[] = …;
INSTANTIATE_TEST_SUITE_P(…);
class LayerTreeHostReadbackDeviceScalePixelTest
: public LayerTreeHostReadbackPixelTest { … };
TEST_P(LayerTreeHostReadbackDeviceScalePixelTest, ReadbackSubrect) { … }
TEST_P(LayerTreeHostReadbackDeviceScalePixelTest, ReadbackNonRootLayerSubrect) { … }
INSTANTIATE_TEST_SUITE_P(…);
class LayerTreeHostReadbackColorSpacePixelTest
: public LayerTreeHostReadbackPixelTest { … };
TEST_P(LayerTreeHostReadbackColorSpacePixelTest, Readback) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}
#endif