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

Side by Side Diff: third_party/WebKit/Source/web/PageOverlayTest.cpp

Issue 1396783003: Factor PaintArtifact out of DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@const-replay
Patch Set: Created 5 years, 2 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
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 #include "config.h" 5 #include "config.h"
6 #include "web/PageOverlay.h" 6 #include "web/PageOverlay.h"
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "platform/graphics/Color.h" 10 #include "platform/graphics/Color.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 GraphicsLayer* graphicsLayer = pageOverlay->graphicsLayer(); 150 GraphicsLayer* graphicsLayer = pageOverlay->graphicsLayer();
151 WebRect rect(0, 0, viewportWidth, viewportHeight); 151 WebRect rect(0, 0, viewportWidth, viewportHeight);
152 152
153 // Paint the layer with a null canvas to get a display list, and then 153 // Paint the layer with a null canvas to get a display list, and then
154 // replay that onto the mock canvas for examination. 154 // replay that onto the mock canvas for examination.
155 GraphicsContext graphicsContext(graphicsLayer->displayItemList()); 155 GraphicsContext graphicsContext(graphicsLayer->displayItemList());
156 graphicsLayer->paint(graphicsContext, rect); 156 graphicsLayer->paint(graphicsContext, rect);
157 157
158 graphicsContext.beginRecording(IntRect(rect)); 158 graphicsContext.beginRecording(IntRect(rect));
159 graphicsLayer->displayItemList()->commitNewDisplayItemsAndReplay(graphicsCon text); 159 graphicsLayer->displayItemList()->commitNewDisplayItems();
160 graphicsLayer->displayItemList()->paintArtifact().replay(graphicsContext);
160 graphicsContext.endRecording()->playback(&canvas); 161 graphicsContext.endRecording()->playback(&canvas);
161 } 162 }
162 163
163 TEST_F(PageOverlayTest, SimpleCanvasOverlay_AcceleratedCompositing) 164 TEST_F(PageOverlayTest, SimpleCanvasOverlay_AcceleratedCompositing)
164 { 165 {
165 runPageOverlayTestWithAcceleratedCompositing<SimpleCanvasOverlay>(); 166 runPageOverlayTestWithAcceleratedCompositing<SimpleCanvasOverlay>();
166 } 167 }
167 168
168 TEST_F(PageOverlayTest, PrivateGraphicsContextOverlay_AcceleratedCompositing) 169 TEST_F(PageOverlayTest, PrivateGraphicsContextOverlay_AcceleratedCompositing)
169 { 170 {
170 runPageOverlayTestWithAcceleratedCompositing<PrivateGraphicsContextOverlay>( ); 171 runPageOverlayTestWithAcceleratedCompositing<PrivateGraphicsContextOverlay>( );
171 } 172 }
172 173
173 } // namespace 174 } // namespace
174 } // namespace blink 175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698