chromium/cc/trees/layer_tree_host_pixeltest_readback.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Can't templatize a class on its own members, so TestReadBackType and
// ReadbackTestConfig are declared here, before LayerTreeHostReadbackPixelTest.
enum class TestReadBackType {};

struct ReadbackTestConfig {};

// Provides a test readback suffix appropriate for |type|.
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) {}

// TODO(crbug.com/41463412): Enable these tests for Skia Vulkan using texture
// readback.
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();

}  // namespace
}  // namespace cc

#endif  // BUILDFLAG(IS_ANDROID)