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

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

Issue 188873005: Do not dynamically call setLayer on RenderWidgetHostViewCocoa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up Created 6 years, 9 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 2d73673fe7d21435348d8bd508c7f29fcd166869..bf9beae3226a0b13c41fff68985e5f14dd536abb 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -441,13 +441,12 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
ui::TextInputType text_input_type_;
bool can_compose_inline_;
- // The background CoreAnimation layer used before compositing nor software
- // compositing has been enabled, and when the compositing or software
- // compositing surface has been evicted.
+ // 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_;
- // The CoreAnimation layer for software compositing. Note that at most one of
- // |software_layer_| and |compositing_iosurface_layer_| may be non-NULL.
+ // The CoreAnimation layer for software compositing. This should be NULL
+ // when software compositing is not in use.
base::scoped_nsobject<SoftwareLayer> software_layer_;
// Accelerated compositing structures. These may be dynamically created and
@@ -545,15 +544,16 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
// invoke it from the message loop.
void ShutdownHost();
- void CreateSoftwareLayerAndDestroyCompositedLayer();
+ void CreateSoftwareLayer();
void DestroySoftwareLayer();
bool CreateCompositedIOSurface();
- bool CreateCompositedLayerAndDestroySoftwareLayer();
+ bool CreateCompositedIOSurfaceLayer();
enum DestroyContextBehavior {
kLeaveContextBoundToView,
kDestroyContext,
};
+ void DestroyCompositedIOSurfaceLayer();
void DestroyCompositedIOSurfaceAndLayer(DestroyContextBehavior
destroy_context_behavior);

Powered by Google App Engine
This is Rietveld 408576698