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

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

Issue 1246173002: Throttle rendering pipeline for invisible iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add layout tests. 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
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"
(...skipping 26 matching lines...) Expand all
37 DisplayItemListPaintTestForSlimmingPaintV2() 37 DisplayItemListPaintTestForSlimmingPaintV2()
38 : m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint V2Enabled()) { } 38 : m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint V2Enabled()) { }
39 39
40 protected: 40 protected:
41 LayoutView& layoutView() { return *document().layoutView(); } 41 LayoutView& layoutView() { return *document().layoutView(); }
42 DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graph icsLayerBacking()->displayItemList(); } 42 DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graph icsLayerBacking()->displayItemList(); }
43 43
44 // Expose some document lifecycle steps for checking new display items befor e commiting. 44 // Expose some document lifecycle steps for checking new display items befor e commiting.
45 void updateLifecyclePhasesToPaintForSlimmingPaintV2Clean(const LayoutRect& i nterestRect = LayoutRect::infiniteRect()) 45 void updateLifecyclePhasesToPaintForSlimmingPaintV2Clean(const LayoutRect& i nterestRect = LayoutRect::infiniteRect())
46 { 46 {
47 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp ositingCleanPlusScrolling); 47 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp ositingCleanPlusScrolling, DocumentLifecycle::ThrottlingMode::Disallow);
48 document().view()->invalidateTreeIfNeededRecursive(); 48 document().view()->invalidateTreeIfNeededRecursive();
49 document().view()->paintForSlimmingPaintV2(interestRect); 49 document().view()->paintForSlimmingPaintV2(interestRect);
50 } 50 }
51 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming PaintV2(); } 51 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming PaintV2(); }
52 52
53 private: 53 private:
54 void SetUp() override 54 void SetUp() override
55 { 55 {
56 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); 56 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true);
57 57
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 for (size_t index = 0; index < std::min<size_t>(actual.size(), expectedS ize); index++) { \ 94 for (size_t index = 0; index < std::min<size_t>(actual.size(), expectedS ize); index++) { \
95 TRACE_DISPLAY_ITEMS(index, expected[index], actual[index]); \ 95 TRACE_DISPLAY_ITEMS(index, expected[index], actual[index]); \
96 EXPECT_EQ(expected[index].client(), actual[index].client()); \ 96 EXPECT_EQ(expected[index].client(), actual[index].client()); \
97 EXPECT_EQ(expected[index].type(), actual[index].type()); \ 97 EXPECT_EQ(expected[index].type(), actual[index].type()); \
98 } \ 98 } \
99 } while (false); 99 } while (false);
100 100
101 } // namespace blink 101 } // namespace blink
102 102
103 #endif // DisplayItemListPaintTest_h 103 #endif // DisplayItemListPaintTest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698