Index: content/renderer/gpu/render_widget_compositor.cc |
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc |
index 1dc83d435c95cdc60f92769d099b57497d2cb93b..ca273b187e8ca0036c74365d914befe5e1fd3cdc 100644 |
--- a/content/renderer/gpu/render_widget_compositor.cc |
+++ b/content/renderer/gpu/render_widget_compositor.cc |
@@ -17,6 +17,7 @@ |
#include "content/renderer/gpu/compositor_thread.h" |
#include "content/renderer/render_thread_impl.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewClient.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_layer_impl.h" |
#include "webkit/compositor_bindings/web_to_ccinput_handler_adapter.h" |
@@ -343,6 +344,36 @@ void RenderWidgetCompositor::didRecreateOutputSurface(bool success) { |
client_->didRecreateOutputSurface(success); |
} |
+// TODO(danakj): This should go through WebWidget |
+WebKit::WebGraphicsContext3D* |
+RenderWidgetCompositor::OffscreenContext3dForMainThread() { |
+ return WebKit::WebSharedGraphicsContext3D::mainThreadContext(); |
+} |
+ |
+// TODO(danakj): This should go through WebWidget |
+WebKit::WebGraphicsContext3D* |
+RenderWidgetCompositor::OffscreenContext3dForCompositorThread() { |
+ if (!WebKit::WebSharedGraphicsContext3D::haveCompositorThreadContext() && |
+ !WebKit::WebSharedGraphicsContext3D::createCompositorThreadContext()) |
+ return NULL; |
+ return WebKit::WebSharedGraphicsContext3D::compositorThreadContext(); |
piman
2013/02/13 19:13:31
WebSharedGraphicsContext3D::compositorThreadContex
danakj
2013/02/13 20:57:23
I think this one is okay, it just does this:
P
|
+} |
+ |
+// TODO(danakj): This should go through WebWidget |
+GrContext* RenderWidgetCompositor::OffscreenGrContextForMainThread() { |
+ return WebKit::WebSharedGraphicsContext3D::mainThreadGrContext(); |
+} |
+ |
+// TODO(danakj): This should go through WebWidget |
+GrContext* RenderWidgetCompositor::OffscreenGrContextForCompositorThread() { |
+ return WebKit::WebSharedGraphicsContext3D::compositorThreadGrContext(); |
piman
2013/02/13 19:13:31
Same here, I think this will break if called on th
danakj
2013/02/13 20:57:23
Right.. ok I'll have to make the gr context creati
|
+} |
+ |
+// TODO(danakj): This should go through WebWidget |
+void RenderWidgetCompositor::DestroyOffscreenContext3dForCompositorThread() { |
+ WebKit::WebSharedGraphicsContext3D::createCompositorThreadContext(); |
+} |
+ |
// TODO(jamesr): This should go through WebWidget |
scoped_ptr<cc::InputHandler> RenderWidgetCompositor::createInputHandler() { |
scoped_ptr<cc::InputHandler> ret; |