summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc8
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h2
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc5
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.h1
4 files changed, 16 insertions, 0 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index 9a6f472..0b623cc 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -752,6 +752,7 @@ WebGraphicsContext3DInProcessCommandBufferImpl::
plugin_handle_(NULL),
#endif // defined(OS_MACOSX)
context_lost_callback_(0),
+ context_lost_reason_(GL_NO_ERROR),
cached_width_(0),
cached_height_(0),
bound_fbo_(0) {
@@ -1788,7 +1789,14 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::setContextLostCallback(
context_lost_callback_ = cb;
}
+WGC3Denum WebGraphicsContext3DInProcessCommandBufferImpl::
+ getGraphicsResetStatusARB() {
+ return context_lost_reason_;
+}
+
void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() {
+ // TODO(kbr): improve the precision here.
+ context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB;
if (context_lost_callback_) {
context_lost_callback_->onContextLost();
}
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
index 3b6aaa8..5e2df99 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -429,6 +429,7 @@ class WebGraphicsContext3DInProcessCommandBufferImpl
virtual void setContextLostCallback(
WebGraphicsContext3D::WebGraphicsContextLostCallback* callback);
+ virtual WGC3Denum getGraphicsResetStatusARB();
private:
// SwapBuffers callback.
@@ -451,6 +452,7 @@ class WebGraphicsContext3DInProcessCommandBufferImpl
gfx::PluginWindowHandle plugin_handle_;
#endif
WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_;
+ WGC3Denum context_lost_reason_;
WebKit::WebGraphicsContext3D::Attributes attributes_;
int cached_width_, cached_height_;
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index 300bd27..e7d5757 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -1573,6 +1573,11 @@ void WebGraphicsContext3DInProcessImpl::deleteTexture(WebGLId texture) {
glDeleteTextures(1, &texture);
}
+WGC3Denum WebGraphicsContext3DInProcessImpl::getGraphicsResetStatusARB() {
+ // TODO(kbr): this implementation doesn't support lost contexts yet.
+ return GL_NO_ERROR;
+}
+
bool WebGraphicsContext3DInProcessImpl::AngleCreateCompilers() {
if (!ShInitialize())
return false;
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index 304f9fb..aafff28 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -407,6 +407,7 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
virtual void setContextLostCallback(
WebGraphicsContext3D::WebGraphicsContextLostCallback* callback) {}
+ virtual WGC3Denum getGraphicsResetStatusARB();
private:
// ANGLE related.