Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp

Issue 2176573004: Enable subsequence caching for spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CachePaintProperties
Patch Set: Spv2 configuration for PaintLayerPainterTest, unsigned->size_t etc. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
index 5e9c5922ea810716434e817a70cba8083fe6fd3a..e7957b179f1a57323fbce5d50d2e210b26676db5 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
@@ -10,17 +10,28 @@
namespace blink {
+struct PaintLayerPainterTestParam {
+ PaintLayerPainterTestParam(FrameSettingOverrideFunction frameSettingOverride, bool slimmingPaintV2)
+ : frameSettingOverride(frameSettingOverride), slimmingPaintV2(slimmingPaintV2) { }
+
+ FrameSettingOverrideFunction frameSettingOverride;
+ bool slimmingPaintV2;
+};
+
class PaintLayerPainterTest
- : public PaintControllerPaintTest
- , public testing::WithParamInterface<FrameSettingOverrideFunction> {
+ : public PaintControllerPaintTestBase
+ , public testing::WithParamInterface<PaintLayerPainterTestParam> {
USING_FAST_MALLOC(PaintLayerPainterTest);
public:
- FrameSettingOverrideFunction settingOverrider() const override { return GetParam(); }
+ PaintLayerPainterTest() : PaintControllerPaintTestBase(GetParam().slimmingPaintV2) { }
+ FrameSettingOverrideFunction settingOverrider() const override { return GetParam().frameSettingOverride; }
};
INSTANTIATE_TEST_CASE_P(All, PaintLayerPainterTest, ::testing::Values(
- nullptr,
- RootLayerScrollsFrameSettingOverride));
+ PaintLayerPainterTestParam(nullptr, false), // non-root-layer-scrolls, slimming-paint-v1
+ PaintLayerPainterTestParam(nullptr, true), // non-root-layer-scrolls, slimming-paint-v2
+ PaintLayerPainterTestParam(RootLayerScrollsFrameSettingOverride, false), // root-layer-scrolls, slimming-paint-v1
+ PaintLayerPainterTestParam(RootLayerScrollsFrameSettingOverride, true))); // root-layer-scrolls, slimming-paint-v2
TEST_P(PaintLayerPainterTest, CachedSubsequence)
{
@@ -78,6 +89,10 @@ TEST_P(PaintLayerPainterTest, CachedSubsequence)
TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
{
+ // TODO(wangxianzhu): SPv2 deals with interest rect differently, so disable this test for SPv2 temporarily.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return;
+
setBodyInnerHTML(
"<div id='container1' style='position: relative; z-index: 1; width: 200px; height: 200px; background-color: blue'>"
" <div id='content1' style='position: absolute; width: 100px; height: 100px; background-color: green'></div>"
@@ -136,7 +151,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
// because it was fully painted before;
// Container2's intersection with the interest rect changes;
// Content2b is out of the interest rect and outputs nothing;
- // Container3 becomes out of the interest rect and outputs empty subsequence pair..
+ // Container3 becomes out of the interest rect and outputs empty subsequence pair.
EXPECT_EQ(7, numCachedNewItems());
commit();
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698