Index: content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
index 79758afea8677b6f76fb426039ec50e356f3a2f0..d64ebadfe93496e0a7026b14cc3badcf3eabf75d 100644 |
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
@@ -9,6 +9,7 @@ |
#include "gpu/command_buffer/client/gl_in_process_context.h" |
#include "ui/gl/android/surface_texture.h" |
#include "ui/gl/gl_surface.h" |
+#include "ui/gl/gl_surface_stub.h" |
#include "webkit/common/gpu/context_provider_in_process.h" |
#include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
@@ -23,6 +24,8 @@ blink::WebGraphicsContext3D::Attributes GetDefaultAttribs() { |
attributes.antialias = false; |
attributes.shareResources = true; |
attributes.noAutomaticFlushes = true; |
+ attributes.stencil = false; |
+ attributes.depth = false; |
return attributes; |
} |
@@ -70,6 +73,7 @@ class VideoContextProvider |
context_provider_ = webkit::gpu::ContextProviderInProcess::Create( |
WrapContext(gl_in_process_context.Pass()), |
"Video-Offscreen-main-thread"); |
+ context_provider_->BindToCurrentThread(); |
} |
virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
@@ -158,7 +162,7 @@ scoped_refptr<cc::ContextProvider> SynchronousCompositorFactoryImpl:: |
if (!offscreen_context_for_compositor_thread_.get() || |
offscreen_context_for_compositor_thread_->DestroyedOnMainThread()) { |
scoped_ptr<gpu::GLInProcessContext> context = |
- CreateContext(NULL, service_, NULL); |
+ CreateContext(new gfx::GLSurfaceStub, service_, NULL); |
wrapped_gl_context_for_compositor_thread_ = context.get(); |
offscreen_context_for_compositor_thread_ = |
webkit::gpu::ContextProviderInProcess::Create( |
@@ -242,8 +246,10 @@ SynchronousCompositorFactoryImpl::TryCreateStreamTextureFactory() { |
DCHECK(service_); |
DCHECK(wrapped_gl_context_for_compositor_thread_); |
- video_context_provider_ = new VideoContextProvider(CreateContext( |
- NULL, service_, wrapped_gl_context_for_compositor_thread_)); |
+ video_context_provider_ = new VideoContextProvider( |
+ CreateContext(new gfx::GLSurfaceStub, |
+ service_, |
+ wrapped_gl_context_for_compositor_thread_)); |
} |
return video_context_provider_; |
} |