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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2005013002: mac: ensure ui::Compositor exists for visible RWHVs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also clean up swap buffers Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 86481a97da9b4ab23e3ceb789bcc0e2c0b0063de..cda7d0196d15562d80c6a41af0ac8686b4ce4bca 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -594,6 +594,9 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
->GetInputEventRouter()
->AddSurfaceIdNamespaceOwner(GetSurfaceIdNamespace(), this);
}
+
+ if (!render_widget_host_->is_hidden())
+ EnsureBrowserCompositorView();
}
RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
@@ -1477,8 +1480,7 @@ void RenderWidgetHostViewMac::OnSwapCompositorFrame(
gfx::Size dip_size = gfx::ConvertSizeToDIP(scale_factor, pixel_size);
root_layer_->SetBounds(gfx::Rect(dip_size));
- if (!render_widget_host_->is_hidden()) {
- EnsureBrowserCompositorView();
+ if (!browser_compositor->compositor()) {
danakj 2016/05/24 00:34:40 Is this inverted? if (!a) a->Foo() is a crash
ccameron 2016/05/24 00:37:39 Just needs "if (browser_compositor)"
browser_compositor_->compositor()->SetScaleAndSize(
scale_factor, pixel_size);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698