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

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: Ensure in ctor and always in show Created 4 years, 6 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 | content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm » ('j') | 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 6b759cee848fc22a310e525221104b0a0af13b9c..2e7c96a271b31787425f3e20b74f2fb7bd7c047c 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -597,6 +597,9 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
->GetInputEventRouter()
->AddSurfaceIdNamespaceOwner(GetSurfaceIdNamespace(), this);
}
+
+ if (!render_widget_host_->is_hidden())
+ EnsureBrowserCompositorView();
}
RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
@@ -887,8 +890,6 @@ RenderWidgetHost* RenderWidgetHostViewMac::GetRenderWidgetHost() const {
void RenderWidgetHostViewMac::Show() {
ScopedCAActionDisabler disabler;
[cocoa_view_ setHidden:NO];
- if (!render_widget_host_->is_hidden())
- return;
// Re-create the browser compositor. If the DelegatedFrameHost has a cached
// frame from the last time it was visible, then it will immediately be
@@ -896,6 +897,9 @@ void RenderWidgetHostViewMac::Show() {
// frame is swapped.
EnsureBrowserCompositorView();
+ if (!render_widget_host_->is_hidden())
+ return;
+
WasUnOccluded();
// If there is not a frame being currently drawn, kick one, so that the below
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698