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

Side by Side Diff: Source/core/paint/DisplayItemListPaintTest.h

Issue 1355753008: RuntimeEnabledFeatures::slimmingPaintOffsetCaching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/paint/LayoutObjectDrawingRecorder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DisplayItemListPaintTest_h 5 #ifndef DisplayItemListPaintTest_h
6 #define DisplayItemListPaintTest_h 6 #define DisplayItemListPaintTest_h
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
11 #include "core/paint/DeprecatedPaintLayer.h" 11 #include "core/paint/DeprecatedPaintLayer.h"
12 #include "platform/graphics/GraphicsLayer.h" 12 #include "platform/graphics/GraphicsLayer.h"
13 #include <gtest/gtest.h> 13 #include <gtest/gtest.h>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class DisplayItemListPaintTest : public RenderingTest { 17 class DisplayItemListPaintTest : public RenderingTest {
18 public: 18 public:
19 DisplayItemListPaintTest() 19 DisplayItemListPaintTest()
20 : m_originalSlimmingPaintSubsequenceCachingEnabled(RuntimeEnabledFeature s::slimmingPaintSubsequenceCachingEnabled()) 20 : m_originalSlimmingPaintSubsequenceCachingEnabled(RuntimeEnabledFeature s::slimmingPaintSubsequenceCachingEnabled())
21 , m_originalSlimmingPaintOffsetCachingEnabled(RuntimeEnabledFeatures::sl immingPaintOffsetCachingEnabled())
21 { } 22 { }
22 23
23 protected: 24 protected:
24 LayoutView& layoutView() { return *document().layoutView(); } 25 LayoutView& layoutView() { return *document().layoutView(); }
25 DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graph icsLayerBacking()->displayItemList(); } 26 DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graph icsLayerBacking()->displayItemList(); }
26 27
27 private: 28 private:
28 void SetUp() override 29 void SetUp() override
29 { 30 {
30 RenderingTest::SetUp(); 31 RenderingTest::SetUp();
31 enableCompositing(); 32 enableCompositing();
32 } 33 }
33 void TearDown() override 34 void TearDown() override
34 { 35 {
35 RuntimeEnabledFeatures::setSlimmingPaintSubsequenceCachingEnabled(m_orig inalSlimmingPaintSubsequenceCachingEnabled); 36 RuntimeEnabledFeatures::setSlimmingPaintSubsequenceCachingEnabled(m_orig inalSlimmingPaintSubsequenceCachingEnabled);
37 RuntimeEnabledFeatures::setSlimmingPaintOffsetCachingEnabled(m_originalS limmingPaintOffsetCachingEnabled);
36 } 38 }
37 39
38 bool m_originalSlimmingPaintSubsequenceCachingEnabled; 40 bool m_originalSlimmingPaintSubsequenceCachingEnabled;
41 bool m_originalSlimmingPaintOffsetCachingEnabled;
39 }; 42 };
40 43
41 // Slimming paint v2 has subtly different behavior on some paint tests. This 44 // Slimming paint v2 has subtly different behavior on some paint tests. This
42 // class is used to test only v2 behavior while maintaining v1 test coverage. 45 // class is used to test only v2 behavior while maintaining v1 test coverage.
43 class DisplayItemListPaintTestForSlimmingPaintV2 : public RenderingTest { 46 class DisplayItemListPaintTestForSlimmingPaintV2 : public RenderingTest {
44 public: 47 public:
45 DisplayItemListPaintTestForSlimmingPaintV2() 48 DisplayItemListPaintTestForSlimmingPaintV2()
46 : m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint V2Enabled()) { } 49 : m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint V2Enabled()) { }
47 50
48 protected: 51 protected:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 for (size_t index = 0; index < std::min<size_t>(actual.size(), expectedS ize); index++) { \ 105 for (size_t index = 0; index < std::min<size_t>(actual.size(), expectedS ize); index++) { \
103 TRACE_DISPLAY_ITEMS(index, expected[index], actual[index]); \ 106 TRACE_DISPLAY_ITEMS(index, expected[index], actual[index]); \
104 EXPECT_EQ(expected[index].client(), actual[index].client()); \ 107 EXPECT_EQ(expected[index].client(), actual[index].client()); \
105 EXPECT_EQ(expected[index].type(), actual[index].type()); \ 108 EXPECT_EQ(expected[index].type(), actual[index].type()); \
106 } \ 109 } \
107 } while (false); 110 } while (false);
108 111
109 } // namespace blink 112 } // namespace blink
110 113
111 #endif // DisplayItemListPaintTest_h 114 #endif // DisplayItemListPaintTest_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/paint/LayoutObjectDrawingRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698