Chromium Code Reviews| 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 |