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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index e0e3c52ffd6abf3a5120f14f4b4c6dd605dff45a..1c6db99c437a5dd0f95a0694e7febf1be388d55b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -205,7 +205,8 @@ class RenderWidgetHostViewAura::ResizeLock
// RenderWidgetHostViewAura, public:
RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
- : host_(RenderWidgetHostImpl::From(host)),
+ : RenderWidgetHostViewBase(CompositingDelegateAura(this)),
+ host_(RenderWidgetHostImpl::From(host)),
ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))),
in_shutdown_(false),
is_fullscreen_(false),
@@ -687,16 +688,6 @@ void RenderWidgetHostViewAura::SetScrollOffsetPinning(
// Not needed. Mac-only.
}
-gfx::GLSurfaceHandle RenderWidgetHostViewAura::GetCompositingSurface() {
- ui::Compositor* compositor = GetCompositor();
- if (shared_surface_handle_.is_null() && compositor) {
- ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
- shared_surface_handle_ = factory->CreateSharedSurfaceHandle(compositor);
- factory->AddObserver(this);
- }
- return shared_surface_handle_;
-}
-
bool RenderWidgetHostViewAura::LockMouse() {
aura::RootWindow* root_window = window_->GetRootWindow();
if (!root_window)
@@ -1420,3 +1411,23 @@ void content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
WebKit::WebScreenInfo* results) {
GetScreenInfoForWindow(results, NULL);
}
+
+////////////////////////////////////////////////////////////////////////////////
+// CompositingDelegateAura, public:
+
+gfx::GLSurfaceHandle
+RenderWidgetHostViewAura::CompositingDelegateAura::GetCompositingSurface() {
+ ui::Compositor* compositor = view_->GetCompositor();
+ if (view_->shared_surface_handle_.is_null() && compositor) {
+ ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
+ view_shared_surface_handle_ =
+ factory->CreateSharedSurfaceHandle(compositor);
+ factory->AddObserver(view_);
+ }
+ return view_shared_surface_handle_;
+}
+
+bool
+renderWidgetHostViewAura::CompositingDelegateAura::ResizeNeedsNewSurface() {
+ return false;
+}

Powered by Google App Engine
This is Rietveld 408576698