Index: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp |
index 40a2e40a1478e55a90bd77cace6342b8c112680c..160f6ab2072bd8a8efeb67be6de291c8b286937c 100644 |
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp |
@@ -236,9 +236,7 @@ class Canvas2DLayerBridgeTest : public Test { |
Canvas2DLayerBridge::ForceAccelerationForTesting, nullptr, |
kN32_SkColorType))); |
- // TODO(junov): The PrepareTextureMailbox() method will fail a DCHECK if we |
- // don't do this before calling it the first time when the context is lost. |
- bridge->prepareSurfaceForPaintingIfNeeded(); |
+ EXPECT_TRUE(bridge->isAccelerated()); |
// When the context is lost we are not sure if we should still be producing |
// GL frames for the compositor or not, so fail to generate frames. |
@@ -259,10 +257,8 @@ class Canvas2DLayerBridgeTest : public Test { |
Canvas2DLayerBridge::ForceAccelerationForTesting, nullptr, |
kN32_SkColorType))); |
- // TODO(junov): The PrepareTextureMailbox() method will fail a DCHECK if we |
- // don't do this before calling it the first time when the context is lost. |
- bridge->prepareSurfaceForPaintingIfNeeded(); |
- |
+ bridge->getOrCreateSurface(); |
+ EXPECT_TRUE(bridge->checkSurfaceValid()); |
// When the context is lost we are not sure if we should still be producing |
// GL frames for the compositor or not, so fail to generate frames. |
gl.setIsContextLost(true); |
@@ -414,7 +410,7 @@ void runCreateBridgeTask(Canvas2DLayerBridgePtr* bridgePtr, |
Canvas2DLayerBridge::EnableAcceleration); |
// draw+flush to trigger the creation of a GPU surface |
(*bridgePtr)->didDraw(FloatRect(0, 0, 1, 1)); |
- (*bridgePtr)->finalizeFrame(FloatRect(0, 0, 1, 1)); |
+ (*bridgePtr)->finalizeFrame(); |
(*bridgePtr)->flush(); |
doneEvent->signal(); |
} |
@@ -673,7 +669,7 @@ TEST_F(Canvas2DLayerBridgeTest, |
void runRenderingTask(Canvas2DLayerBridge* bridge, WaitableEvent* doneEvent) { |
bridge->didDraw(FloatRect(0, 0, 1, 1)); |
- bridge->finalizeFrame(FloatRect(0, 0, 1, 1)); |
+ bridge->finalizeFrame(); |
bridge->flush(); |
doneEvent->signal(); |
} |