#include "third_party/blink/renderer/platform/graphics/compositing/pending_layer.h"
#include <memory>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/graphics/paint/clip_paint_property_node.h"
#include "third_party/blink/renderer/platform/graphics/paint/effect_paint_property_node.h"
#include "third_party/blink/renderer/platform/graphics/paint/scroll_paint_property_node.h"
#include "third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h"
#include "third_party/blink/renderer/platform/testing/paint_property_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/test_paint_artifact.h"
namespace blink {
namespace {
ElementsAre;
Vector<wtf_size_t> ChunkIndices(const PendingLayer& layer) { … }
bool DefaultIsCompositedScroll(
const TransformPaintPropertyNode& scroll_translation) { … }
bool Merge(PendingLayer& home,
const PendingLayer& guest,
LCDTextPreference lcd_text_preference = LCDTextPreference::kIgnored,
PendingLayer::IsCompositedScrollFunction is_composited_scroll =
DefaultIsCompositedScroll) { … }
TEST(PendingLayerTest, Merge) { … }
TEST(PendingLayerTest, MergeWithGuestTransform) { … }
TEST(PendingLayerTest, MergeWithHomeTransform) { … }
TEST(PendingLayerTest, MergeWithBothTransforms) { … }
TEST(PendingLayerTest, MergeSparseTinyLayers) { … }
TEST(PendingLayerTest, DontMergeSparse) { … }
TEST(PendingLayerTest, PendingLayerDontMergeSparseWithTransforms) { … }
TEST(PendingLayerTest, DontMergeSparseInCompositedEffect) { … }
TEST(PendingLayerTest, MergeSparseInNonCompositedEffect) { … }
TEST(PendingLayerTest, KnownOpaque) { … }
TEST(PendingLayerTest, SolidColor) { … }
class PendingLayerTextOpaquenessTest
: public testing::Test,
public testing::WithParamInterface<LCDTextPreference> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(PendingLayerTextOpaquenessTest, OpaqueTextAndOpaqueText) { … }
TEST_P(PendingLayerTextOpaquenessTest, NonOpaqueTextAndOpaqueText) { … }
TEST_P(PendingLayerTextOpaquenessTest, OpaqueTextAndNonOpaqueText) { … }
TEST_P(PendingLayerTextOpaquenessTest, NonOpaqueTextAndOpaqueTextCovered) { … }
TEST_P(PendingLayerTextOpaquenessTest, OpaqueTextAndNonOpaqueTextCovered) { … }
TEST_P(PendingLayerTextOpaquenessTest, NoTextAndOpaqueText) { … }
TEST_P(PendingLayerTextOpaquenessTest, OpaqueTextAndNoText) { … }
TEST_P(PendingLayerTextOpaquenessTest, NonOpaqueNoTextAndNonOpaqueText) { … }
TEST_P(PendingLayerTextOpaquenessTest, NonOpaqueTextAndNonOpaqueNoText) { … }
TEST_P(PendingLayerTextOpaquenessTest, OpaqueNoTextAndNonOpaqueText) { … }
TEST_P(PendingLayerTextOpaquenessTest, NonOpaqueTextAndOpaqueNoText) { … }
TEST_P(PendingLayerTextOpaquenessTest, UnitedClippedToOpaque) { … }
}
}