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

Unified Diff: Source/core/tests/FakeWebGraphicsContext3D.h

Issue 21858004: Refactoring Canvas2DLayerBridge to make it easier to write unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed similarity blunder Created 7 years, 4 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/Canvas2DLayerManagerTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/tests/FakeWebGraphicsContext3D.h
diff --git a/Source/core/tests/FakeWebGraphicsContext3D.h b/Source/core/tests/FakeWebGraphicsContext3D.h
index 693e246843492cc10bb1d2fbb6b8d2da3ba651d8..52e2f1ac39bbd2c7ec7d14fbefa6cb7c0035de0f 100644
--- a/Source/core/tests/FakeWebGraphicsContext3D.h
+++ b/Source/core/tests/FakeWebGraphicsContext3D.h
@@ -37,6 +37,7 @@ class FakeWebGraphicsContext3D : public WebGraphicsContext3D {
public:
FakeWebGraphicsContext3D()
: m_nextTextureId(1)
+ , m_isContextLost(false)
{
}
@@ -53,7 +54,7 @@ public:
virtual void synthesizeGLError(WGC3Denum) { }
- virtual bool isContextLost() { return false; }
+ virtual bool isContextLost() { return m_isContextLost; }
virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeiptr size, WGC3Denum access) { return 0; }
virtual void unmapBufferSubDataCHROMIUM(const void*) { }
@@ -263,9 +264,12 @@ public:
virtual void getQueryivEXT(GC3Denum, GC3Denum, GC3Dint*) { }
virtual void getQueryObjectuivEXT(WebGLId, GC3Denum, GC3Duint*) { }
+ void fakeContextLoss() { m_isContextLost = true;}
+
protected:
unsigned m_nextTextureId;
Attributes m_attrs;
+ bool m_isContextLost;
};
} // namespace WebKit
« no previous file with comments | « Source/core/platform/graphics/chromium/Canvas2DLayerManagerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698