| 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);
|
| }
|
| }
|
|
|
|
|