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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.h

Issue 189233012: Convert CompositingLayerMapping code to use reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make RenderLayer non-copyable 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
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/CompositedLayerMapping.h
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.h b/Source/core/rendering/compositing/CompositedLayerMapping.h
index 2b46e782a412a0065b35f26c1baad3c9e8f782dc..c57d91ed82126305b91c5f1815f25285f2f43cd3 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.h
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.h
@@ -79,10 +79,10 @@ struct GraphicsLayerPaintInfo {
class CompositedLayerMapping FINAL : public GraphicsLayerClient {
WTF_MAKE_NONCOPYABLE(CompositedLayerMapping); WTF_MAKE_FAST_ALLOCATED;
public:
- explicit CompositedLayerMapping(RenderLayer*);
+ explicit CompositedLayerMapping(RenderLayer&);
virtual ~CompositedLayerMapping();
- RenderLayer* owningLayer() const { return m_owningLayer; }
+ RenderLayer& owningLayer() const { return m_owningLayer; }
enum UpdateAfterLayoutFlag {
CompositingChildrenOnly = 1 << 0,
@@ -208,8 +208,8 @@ private:
PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons);
bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer, CompositingReasons);
- RenderLayerModelObject* renderer() const { return m_owningLayer->renderer(); }
- RenderLayerCompositor* compositor() const { return m_owningLayer->compositor(); }
+ RenderLayerModelObject* renderer() const { return m_owningLayer.renderer(); }
+ RenderLayerCompositor* compositor() const { return m_owningLayer.compositor(); }
void updateInternalHierarchy();
bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip);
@@ -219,9 +219,9 @@ private:
bool updateBackgroundLayer(bool needsBackgroundLayer);
bool updateMaskLayer(bool needsMaskLayer);
bool updateClippingMaskLayers(bool needsChildClippingMaskLayer);
- bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scrollableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); }
- bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollableArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); }
- bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableArea() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty(); }
+ bool requiresHorizontalScrollbarLayer() const { return m_owningLayer.scrollableArea() && m_owningLayer.scrollableArea()->horizontalScrollbar(); }
+ bool requiresVerticalScrollbarLayer() const { return m_owningLayer.scrollableArea() && m_owningLayer.scrollableArea()->verticalScrollbar(); }
+ bool requiresScrollCornerLayer() const { return m_owningLayer.scrollableArea() && !m_owningLayer.scrollableArea()->scrollCornerAndResizerRect().isEmpty(); }
bool updateScrollingLayers(bool scrollingLayers);
void updateScrollParent(RenderLayer*);
void updateClipParent(RenderLayer*);
@@ -275,7 +275,7 @@ private:
void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& clip);
- RenderLayer* m_owningLayer;
+ RenderLayer& m_owningLayer;
// The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this:
//
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698