Chromium Code Reviews| 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 599766b7d0ab21627e93f59df9225a9b8e16c9f0..6d840949abb942421692bb0e8c4e80d2e23a782d 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" |
| @@ -287,6 +288,31 @@ 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(); |
|
jamesr
2013/02/09 02:48:12
this will go to the new content/common/gpu/offscre
danakj
2013/02/09 02:50:51
Ya this calls RenderThreadImpl::current()->Offscre
|
| +} |
| + |
| +// 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(); |
| +} |
| + |
| // TODO(jamesr): This should go through WebWidget |
| scoped_ptr<cc::InputHandler> RenderWidgetCompositor::createInputHandler() { |
| scoped_ptr<cc::InputHandler> ret; |