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

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: Restart with GrContext owned in cc 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
« no previous file with comments | « 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 d2c8da314a7c3855dbc2332b33a98b1602d50b44..58023ff8b7769019170fad31f30e15a5cd2163a8 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -17,6 +17,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"
@@ -265,6 +266,18 @@ void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success)
m_client->didRecreateOutputSurface(success);
}
+WebKit::WebGraphicsContext3D* WebLayerTreeViewImpl::OffscreenContext3dForMainThread()
+{
+ return WebSharedGraphicsContext3D::mainThreadContext();
danakj 2013/02/12 07:34:04 Should this be going right to the webkit/ version
+}
+
+WebKit::WebGraphicsContext3D* WebLayerTreeViewImpl::OffscreenContext3dForCompositorThread()
+{
+ if (!WebSharedGraphicsContext3D::haveCompositorThreadContext() && !WebSharedGraphicsContext3D::createCompositorThreadContext())
+ return NULL;
+ return WebSharedGraphicsContext3D::compositorThreadContext();
+}
+
scoped_ptr<InputHandler> WebLayerTreeViewImpl::createInputHandler()
{
scoped_ptr<InputHandler> ret;
« no previous file with comments | « 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