Index: content/browser/renderer_host/compositor_impl_android.cc |
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc |
index 7954175feea775ff47621cde2141af9af49b1bd5..75598825173c415af1e5c26a671207e8e4a5a21d 100644 |
--- a/content/browser/renderer_host/compositor_impl_android.cc |
+++ b/content/browser/renderer_host/compositor_impl_android.cc |
@@ -29,6 +29,7 @@ |
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
#include "ui/gfx/android/java_bitmap.h" |
#include "webkit/glue/webthread_impl.h" |
+#include "webkit/gpu/context_provider.h" |
piman
2013/02/22 02:54:07
You probably meant to fix this and some other inst
danakj
2013/02/22 03:04:49
oops missed that, thanks.
|
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
namespace gfx { |
@@ -326,6 +327,31 @@ void CompositorImpl::scheduleComposite() { |
client_->ScheduleComposite(); |
} |
+class NullContextProvider : public webkit::gpu::ContextProvider { |
+ // TODO(danakj): Get a context through ImageTransportSurfaceAndroid. |
+ virtual bool InitializeOnMainThread() { return false; } |
+ virtual bool BindToCurrentThread() { return false; } |
+ virtual WebKit::WebGraphicsContext3D* Context3d() { return NULL; } |
+ virtual class GrContext* GrContext() { return NULL; } |
+ virtual void VerifyContexts() {} |
+ protected: |
+ virtual ~NullContextProvider() {} |
+}; |
+ |
+scoped_refptr<webkit::gpu::ContextProvider> |
+CompositorImpl::OffscreenContextProviderForMainThread() { |
+ if (!null_offscreen_context_provider_) |
+ null_offscreen_context_provider_ = new NullContextProvider(); |
+ return null_offscreen_context_provider_; |
+} |
+ |
+scoped_refptr<webkit::gpu::ContextProvider> |
+CompositorImpl::OffscreenContextProviderForCompositorThread() { |
+ if (!null_offscreen_context_provider_) |
+ null_offscreen_context_provider_ = new NullContextProvider(); |
+ return null_offscreen_context_provider_; |
+} |
+ |
void CompositorImpl::OnViewContextSwapBuffersPosted() { |
TRACE_EVENT0("compositor", "CompositorImpl::OnViewContextSwapBuffersPosted"); |
} |