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

Unified Diff: cc/test/fake_web_graphics_context_3d.cc

Issue 11606012: cc: Unify context losing machinery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: cc/test/fake_web_graphics_context_3d.cc
diff --git a/cc/test/fake_web_graphics_context_3d.cc b/cc/test/fake_web_graphics_context_3d.cc
index 52c765d688a36bba486794ac664096849f4bba3f..9fe73da190152226386870a78dd2ec52e668f509 100644
--- a/cc/test/fake_web_graphics_context_3d.cc
+++ b/cc/test/fake_web_graphics_context_3d.cc
@@ -36,7 +36,11 @@ WebKit::WebGLId FakeWebGraphicsContext3D::getPlatformTextureId() {
}
bool FakeWebGraphicsContext3D::isContextLost() {
- return false;
+ return m_contextLost;
+}
+
+WebKit::WGC3Denum FakeWebGraphicsContext3D::getGraphicsResetStatusARB() {
+ return m_contextLost ? GL_INVALID_VALUE : GL_NO_ERROR;
jamesr 2012/12/18 05:40:11 i don't think GL_INVALID_VALUE is a valid return v
danakj 2012/12/18 21:26:59 Done.
}
void* FakeWebGraphicsContext3D::mapBufferSubDataCHROMIUM(
@@ -219,4 +223,15 @@ WebKit::WGC3Dboolean FakeWebGraphicsContext3D::isQueryEXT(WebKit::WebGLId) {
return true;
}
+void FakeWebGraphicsContext3D::setContextLostCallback(
+ WebGraphicsContextLostCallback* callback) {
+ m_contextLostCallback = callback;
+}
+
+void FakeWebGraphicsContext3D::loseContext() {
+ m_contextLost = true;
+ if (m_contextLostCallback)
+ m_contextLostCallback->onContextLost();
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698