Index: webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc |
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc |
index 41e089fa7e47517e822ab14e3c7e375458dfb276..0419167dc36bea972e35921294d45c529e468ee6 100644 |
--- a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc |
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc |
@@ -19,6 +19,7 @@ |
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewClient.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h" |
+#include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsContext3D.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
#include "webkit/compositor_bindings/web_compositor_support_output_surface.h" |
#include "webkit/compositor_bindings/web_layer_impl.h" |
@@ -165,6 +166,32 @@ scoped_ptr<cc::OutputSurface> |
void WebLayerTreeViewImplForTesting::didRecreateOutputSurface(bool success) { } |
+WebKit::WebGraphicsContext3D* WebLayerTreeViewImplForTesting::OffscreenContext3dForMainThread() |
+{ |
+ return WebSharedGraphicsContext3D::mainThreadContext(); |
+} |
+ |
+WebKit::WebGraphicsContext3D* WebLayerTreeViewImplForTesting::OffscreenContext3dForCompositorThread() |
+{ |
+ if (!WebSharedGraphicsContext3D::haveCompositorThreadContext() && !WebSharedGraphicsContext3D::createCompositorThreadContext()) |
+ return NULL; |
+ return WebSharedGraphicsContext3D::compositorThreadContext(); |
+} |
+ |
+GrContext* WebLayerTreeViewImplForTesting::OffscreenGrContextForMainThread() |
+{ |
+ return WebSharedGraphicsContext3D::mainThreadGrContext(); |
+} |
+ |
+GrContext* WebLayerTreeViewImplForTesting::OffscreenGrContextForCompositorThread() |
+{ |
+ return WebSharedGraphicsContext3D::compositorThreadGrContext(); |
+} |
+ |
+void WebLayerTreeViewImplForTesting::DestroyOffscreenContext3dForCompositorThread() { |
+ WebSharedGraphicsContext3D::createCompositorThreadContext(); |
+} |
+ |
scoped_ptr<cc::InputHandler> |
WebLayerTreeViewImplForTesting::createInputHandler() { |
return scoped_ptr<cc::InputHandler>(); |