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

Unified Diff: Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp

Issue 16032003: Fixing Canvas2DLayerBridge to handle lost graphics contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Resolved merge with rate limiter CL Created 7 years, 5 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 | « Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
diff --git a/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp b/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
index 81e2d6dbaaee3a0b70706a5b4f749e5abbb90ec9..b7c83c4b47cc62d1ddcde47f324355a98eb76c11 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp
@@ -54,6 +54,18 @@ public:
virtual GrGLInterface* onCreateGrGLInterface() OVERRIDE { return 0; }
};
+class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge {
+public:
+ static PassOwnPtr<FakeCanvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, SkDeferredCanvas* canvas, OpacityMode opacityMode)
+ {
+ return adoptPtr(new FakeCanvas2DLayerBridge(context, canvas, opacityMode));
+ }
+protected:
+ FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, SkDeferredCanvas* canvas, OpacityMode opacityMode) :
+ Canvas2DLayerBridge(context, canvas, opacityMode)
+ { }
+};
+
} // namespace
class Canvas2DLayerBridgeTest : public Test {
@@ -69,7 +81,7 @@ protected:
::testing::Mock::VerifyAndClearExpectations(&mainMock);
- OwnPtr<Canvas2DLayerBridge> bridge = Canvas2DLayerBridge::create(mainContext.release(), &canvas, Canvas2DLayerBridge::NonOpaque);
+ OwnPtr<Canvas2DLayerBridge> bridge = FakeCanvas2DLayerBridge::create(mainContext.release(), &canvas, Canvas2DLayerBridge::NonOpaque);
::testing::Mock::VerifyAndClearExpectations(&mainMock);
« no previous file with comments | « Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698