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

Unified Diff: Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp

Issue 16032003: Fixing Canvas2DLayerBridge to handle lost graphics contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed init, re-arranged constructor Created 7 years, 7 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
Index: Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp
diff --git a/Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp b/Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp
index a5b2c71ef12e94369dbac82b7d87a985470f2c3e..9bf0905d59c2ed4d193abc6d23d0ca83a3b3f316 100644
--- a/Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp
+++ b/Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp
@@ -48,6 +48,7 @@ public:
, m_freeMemoryIfPossibleCount(0)
, m_flushCount(0)
{
+ m_fakeSharedContext = m_context;
}
virtual size_t storageAllocatedForRecording() OVERRIDE
@@ -81,10 +82,17 @@ public:
m_flushCount++;
}
+protected:
+ virtual PassRefPtr<GraphicsContext3D> getSharedContext() const OVERRIDE
+ {
+ return m_fakeSharedContext;
+ }
public:
size_t m_freeableBytes;
int m_freeMemoryIfPossibleCount;
int m_flushCount;
+private:
+ RefPtr<GraphicsContext3D> m_fakeSharedContext;
};
static PassOwnPtr<SkDeferredCanvas> createCanvas(GraphicsContext3D* context) {

Powered by Google App Engine
This is Rietveld 408576698