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

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

Issue 2003243002: Mac fullscreen low power: Ignore WasOccluded by low power window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen_sort_of
Patch Set: fix reversed conditional 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 | ui/accelerated_widget_mac/accelerated_widget_mac.h » ('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 36b9717deac619b6671d4cd64270be76f304e9ef..384bc26e6c6ce9b9ad80bd1be324c28b90d3a594 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -909,7 +909,18 @@ float FlipYFromRectToScreen(float y, float rect_height) {
void RenderWidgetHostViewMac::Hide() {
ScopedCAActionDisabler disabler;
[cocoa_view_ setHidden:YES];
- WasOccluded();
+ if (!render_widget_host_->is_hidden()) {
+ // Note that the following call to WasHidden() can trigger thumbnail
+ // generation on behalf of the NTP, and that cannot succeed if the browser
+ // compositor view has been suspended. Therefore these two statements must
+ // occur in this specific order. However, because thumbnail generation is
+ // asychronous, that operation won't run before
+ // SuspendBrowserCompositorView()
+ // completes. As a result you won't get a thumbnail for the page unless you
+ // execute these two statements in this specific order.
+ render_widget_host_->WasHidden();
+ SuspendBrowserCompositorView();
+ }
DestroySuspendedBrowserCompositorViewIfNeeded();
}
@@ -929,13 +940,16 @@ float FlipYFromRectToScreen(float y, float rect_height) {
if (render_widget_host_->is_hidden())
return;
- // Note that the following call to WasHidden() can trigger thumbnail
- // generation on behalf of the NTP, and that cannot succeed if the browser
- // compositor view has been suspended. Therefore these two statements must
- // occur in this specific order. However, because thumbnail generation is
- // asychronous, that operation won't run before SuspendBrowserCompositorView()
- // completes. As a result you won't get a thumbnail for the page unless you
- // execute these two statements in this specific order.
+ // Ignore occlusion when in fullscreen low power mode, because the occlusion
+ // is likely coming from the fullscreen low power window.
+ if (browser_compositor_) {
+ if (browser_compositor_->accelerated_widget_mac()
+ ->MightBeInFullscreenLowPowerMode())
+ return;
+ }
+
+ // Note the importance of ordering of these calls is the same in the Hide
+ // function.
render_widget_host_->WasHidden();
SuspendBrowserCompositorView();
}
« no previous file with comments | « no previous file | ui/accelerated_widget_mac/accelerated_widget_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698