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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 12212100: Provide shared context to Platform API in renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no ifdefs 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
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 3913247b420c287226603c197481aafb04343047..20919615e2bca381ab42f61cce493bbfbe49b931 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -17,7 +17,6 @@
#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"
@@ -291,26 +290,23 @@ void RenderWidgetCompositor::didRecreateOutputSurface(bool success) {
// TODO(danakj): This should go through WebWidget
WebKit::WebGraphicsContext3D* RenderWidgetCompositor::
OffscreenContext3dForMainThread() {
- return WebKit::WebSharedGraphicsContext3D::mainThreadContext();
+ return RenderThreadImpl::current()->OffscreenContext3dForMainThread();
}
// TODO(danakj): This should go through WebWidget
WebKit::WebGraphicsContext3D* RenderWidgetCompositor::
OffscreenContext3dForCompositorThread() {
- if (!WebKit::WebSharedGraphicsContext3D::haveCompositorThreadContext() &&
- !WebKit::WebSharedGraphicsContext3D::createCompositorThreadContext())
- return NULL;
- return WebKit::WebSharedGraphicsContext3D::compositorThreadContext();
+ return RenderThreadImpl::current()->OffscreenContext3dForCompositorThread();
}
// TODO(danakj): This should go through WebWidget
GrContext* RenderWidgetCompositor::OffscreenGrContextForMainThread() {
- return WebKit::WebSharedGraphicsContext3D::mainThreadGrContext();
+ return RenderThreadImpl::current()->OffscreenGrContextForMainThread();
}
// TODO(danakj): This should go through WebWidget
GrContext* RenderWidgetCompositor::OffscreenGrContextForCompositorThread() {
- return WebKit::WebSharedGraphicsContext3D::compositorThreadGrContext();
+ return RenderThreadImpl::current()->OffscreenGrContextForCompositorThread();
}
// TODO(jamesr): This should go through WebWidget

Powered by Google App Engine
This is Rietveld 408576698