Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add cc::GaneshResourceProvider Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/gl_renderer.cc ('K') | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/web_layer_tree_view_impl.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.cc b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
index b7a7101d5a615d5fb197d7972eb582586b47d665..54b1f9dc68ac74b00c424d40873aed223a078187 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewClient.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.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 "web_layer_impl.h"
#include "web_to_ccinput_handler_adapter.h"
@@ -275,6 +276,28 @@ void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success)
m_client->didRecreateOutputSurface(success);
}
+WebKit::WebGraphicsContext3D* WebLayerTreeViewImpl::offscreenContext3dForMainThread()
+{
+ return WebSharedGraphicsContext3D::mainThreadContext();
+}
+
+WebKit::WebGraphicsContext3D* WebLayerTreeViewImpl::offscreenContext3dForCompositorThread()
+{
+ if (!WebSharedGraphicsContext3D::haveCompositorThreadContext() && !WebSharedGraphicsContext3D::createCompositorThreadContext())
+ return NULL;
+ return WebSharedGraphicsContext3D::compositorThreadContext();
+}
+
+GrContext* WebLayerTreeViewImpl::offscreenGrContextForMainThread()
+{
+ return WebSharedGraphicsContext3D::mainThreadGrContext();
+}
+
+GrContext* WebLayerTreeViewImpl::offscreenGrContextForCompositorThread()
+{
+ return WebSharedGraphicsContext3D::compositorThreadGrContext();
+}
+
scoped_ptr<InputHandler> WebLayerTreeViewImpl::createInputHandler()
{
scoped_ptr<InputHandler> ret;
« cc/gl_renderer.cc ('K') | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698