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

Unified Diff: Source/web/PageOverlayTest.cpp

Issue 1154313004: Stop using deprecatedCreateWithCanvas in SP mode in PageOverlayTest. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageOverlayTest.cpp
diff --git a/Source/web/PageOverlayTest.cpp b/Source/web/PageOverlayTest.cpp
index e06374c1b654281ee91c51daccacf90fa66f0b35..afbe4049ad8fc521358cc6785640f4ba6777596a 100644
--- a/Source/web/PageOverlayTest.cpp
+++ b/Source/web/PageOverlayTest.cpp
@@ -194,19 +194,21 @@ void PageOverlayTest::runPageOverlayTestWithAcceleratedCompositing()
EXPECT_CALL(canvas, onDrawRect(SkRect::MakeWH(viewportWidth, viewportHeight), Property(&SkPaint::getColor, SK_ColorYELLOW)));
GraphicsLayer* graphicsLayer = webViewImpl()->pageOverlays()->graphicsLayerForTesting();
+ WebRect rect(0, 0, viewportWidth, viewportHeight);
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
// If slimming paint is on, we paint the layer with a null canvas to get
// a display list, and then replay that onto the mock canvas for
// examination. This is about as close to the real path as we can easily
// get.
GraphicsContext graphicsContext(graphicsLayer->displayItemList());
- graphicsLayer->paint(graphicsContext, WebRect(0, 0, viewportWidth, viewportHeight));
+ graphicsLayer->paint(graphicsContext, rect);
- OwnPtr<GraphicsContext> replayContext = GraphicsContext::deprecatedCreateWithCanvas(&canvas);
- graphicsLayer->displayItemList()->commitNewDisplayItemsAndReplay(*replayContext);
+ graphicsContext.beginRecording(IntRect(rect));
+ graphicsLayer->displayItemList()->commitNewDisplayItemsAndReplay(graphicsContext);
+ graphicsContext.endRecording()->playback(&canvas);
} else {
OwnPtr<GraphicsContext> graphicsContext = GraphicsContext::deprecatedCreateWithCanvas(&canvas);
- graphicsLayer->paint(*graphicsContext, WebRect(0, 0, viewportWidth, viewportHeight));
+ graphicsLayer->paint(*graphicsContext, rect);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698