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

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

Issue 392143002: Fix flipped views on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rwhelper_monstrosity
Patch Set: Rebase Created 6 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_mac.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 3abfb1d479f6bd85862d9f4fce79eceb648869e9..6d3987ab01cc76932eb59006c8d408f7efcaa92a 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -411,9 +411,16 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
bool can_compose_inline_;
// The background CoreAnimation layer which is hosted by |cocoa_view_|.
- // The compositing or software layers will be added as sublayers to this.
base::scoped_nsobject<CALayer> background_layer_;
+ // A flipped layer, which acts as the parent of the compositing and software
+ // layers. This layer is flipped so that the we don't need to recompute the
+ // origin for sub-layers when their position changes (this is impossible when
+ // using remote layers, as their size change cannot be synchronized with the
+ // window). This indirection is needed because flipping hosted layers (like
+ // |background_layer_|) leads to unpredictable behavior.
+ base::scoped_nsobject<CALayer> flipped_layer_;
+
// The CoreAnimation layer hosted by the GPU process.
base::scoped_nsobject<CALayerHost> remote_layer_host_;

Powered by Google App Engine
This is Rietveld 408576698