| 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..48269eaeac56a60a58e4099e368e309381d46a8b 100644
|
| --- a/cc/test/fake_web_graphics_context_3d.cc
|
| +++ b/cc/test/fake_web_graphics_context_3d.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "cc/test/fake_web_graphics_context_3d.h"
|
| +#include "third_party/khronos/GLES2/gl2ext.h"
|
|
|
| namespace cc {
|
|
|
| @@ -36,7 +37,11 @@ WebKit::WebGLId FakeWebGraphicsContext3D::getPlatformTextureId() {
|
| }
|
|
|
| bool FakeWebGraphicsContext3D::isContextLost() {
|
| - return false;
|
| + return m_contextLost;
|
| +}
|
| +
|
| +WebKit::WGC3Denum FakeWebGraphicsContext3D::getGraphicsResetStatusARB() {
|
| + return m_contextLost ? GL_UNKNOWN_CONTEXT_RESET_ARB : GL_NO_ERROR;
|
| }
|
|
|
| void* FakeWebGraphicsContext3D::mapBufferSubDataCHROMIUM(
|
| @@ -219,4 +224,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
|
|
|