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 f65a8617902acc1d15f3f89dff721588b512632a..67bc9b40c5db8ece3311c6b707b2f631a11d7bc5 100644 |
--- a/content/browser/renderer_host/compositor_impl_android.cc |
+++ b/content/browser/renderer_host/compositor_impl_android.cc |
@@ -28,6 +28,7 @@ |
#include "third_party/khronos/GLES2/gl2.h" |
#include "third_party/khronos/GLES2/gl2ext.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
+#include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsContext3D.h" |
#include "ui/gfx/android/java_bitmap.h" |
#include "webkit/glue/webthread_impl.h" |
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
@@ -340,6 +341,27 @@ scoped_ptr<cc::OutputSurface> CompositorImpl::createOutputSurface() { |
} |
} |
+WebKit::WebGraphicsContext3D* CompositorImpl:: |
+ OffscreenContext3dForMainThread() { |
+ return WebKit::WebSharedGraphicsContext3D::mainThreadContext(); |
+} |
+ |
+WebKit::WebGraphicsContext3D* CompositorImpl:: |
+ OffscreenContext3dForCompositorThread() { |
+ if (!WebKit::WebSharedGraphicsContext3D::haveCompositorThreadContext() && |
+ !WebKit::WebSharedGraphicsContext3D::createCompositorThreadContext()) |
+ return NULL; |
+ return WebKit::WebSharedGraphicsContext3D::compositorThreadContext(); |
+} |
+ |
+GrContext* CompositorImpl::OffscreenGrContextForMainThread() { |
+ return WebKit::WebSharedGraphicsContext3D::mainThreadGrContext(); |
+} |
+ |
+GrContext* CompositorImpl::OffscreenGrContextForCompositorThread() { |
+ return WebKit::WebSharedGraphicsContext3D::compositorThreadGrContext(); |
+} |
+ |
scoped_ptr<cc::InputHandler> CompositorImpl::createInputHandler() { |
return scoped_ptr<cc::InputHandler>(); |
} |