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

Side by Side Diff: Source/core/rendering/RenderLayer.h

Issue 457473002: Remove the CompositedLayerMappingPtr smart ptr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "core/rendering/LayerPaintingInfo.h" 49 #include "core/rendering/LayerPaintingInfo.h"
50 #include "core/rendering/RenderBox.h" 50 #include "core/rendering/RenderBox.h"
51 #include "core/rendering/RenderLayerBlendInfo.h" 51 #include "core/rendering/RenderLayerBlendInfo.h"
52 #include "core/rendering/RenderLayerClipper.h" 52 #include "core/rendering/RenderLayerClipper.h"
53 #include "core/rendering/RenderLayerFilterInfo.h" 53 #include "core/rendering/RenderLayerFilterInfo.h"
54 #include "core/rendering/RenderLayerReflectionInfo.h" 54 #include "core/rendering/RenderLayerReflectionInfo.h"
55 #include "core/rendering/RenderLayerRepainter.h" 55 #include "core/rendering/RenderLayerRepainter.h"
56 #include "core/rendering/RenderLayerScrollableArea.h" 56 #include "core/rendering/RenderLayerScrollableArea.h"
57 #include "core/rendering/RenderLayerStackingNode.h" 57 #include "core/rendering/RenderLayerStackingNode.h"
58 #include "core/rendering/RenderLayerStackingNodeIterator.h" 58 #include "core/rendering/RenderLayerStackingNodeIterator.h"
59 #include "core/rendering/compositing/CompositedLayerMappingPtr.h"
60 #include "platform/graphics/CompositingReasons.h" 59 #include "platform/graphics/CompositingReasons.h"
61 #include "wtf/OwnPtr.h" 60 #include "wtf/OwnPtr.h"
62 61
63 namespace blink { 62 namespace blink {
64 63
65 class FilterEffectRenderer; 64 class FilterEffectRenderer;
66 class FilterOperations; 65 class FilterOperations;
67 class HitTestRequest; 66 class HitTestRequest;
68 class HitTestResult; 67 class HitTestResult;
69 class HitTestingTransformState; 68 class HitTestingTransformState;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 void* operator new(size_t); 298 void* operator new(size_t);
300 // Only safe to call from RenderLayerModelObject::destroyLayer() 299 // Only safe to call from RenderLayerModelObject::destroyLayer()
301 void operator delete(void*); 300 void operator delete(void*);
302 301
303 CompositingState compositingState() const; 302 CompositingState compositingState() const;
304 303
305 // This returns true if our document is in a phase of its lifestyle during w hich 304 // This returns true if our document is in a phase of its lifestyle during w hich
306 // compositing state may legally be read. 305 // compositing state may legally be read.
307 bool isAllowedToQueryCompositingState() const; 306 bool isAllowedToQueryCompositingState() const;
308 307
309 // NOTE: Don't call these compositing methods unless you know what you are d oing and are sure it is the best approach! 308 // Don't null check this.
310 CompositedLayerMappingPtr compositedLayerMapping() const; 309 CompositedLayerMapping* compositedLayerMapping() const;
311 CompositedLayerMappingPtr ensureCompositedLayerMapping(); 310 // FIXME: This should return a reference.
311 CompositedLayerMapping* ensureCompositedLayerMapping();
312 GraphicsLayer* graphicsLayerBacking() const; 312 GraphicsLayer* graphicsLayerBacking() const;
313 GraphicsLayer* graphicsLayerBackingForScrolling() const; 313 GraphicsLayer* graphicsLayerBackingForScrolling() const;
314 // NOTE: If you are using hasCompositedLayerMapping to determine the state o f compositing for this layer, 314 // NOTE: If you are using hasCompositedLayerMapping to determine the state o f compositing for this layer,
315 // (and not just to do bookkeeping related to the mapping like, say, allocat ing or deallocating a mapping), 315 // (and not just to do bookkeeping related to the mapping like, say, allocat ing or deallocating a mapping),
316 // then you may have incorrect logic. Use compositingState() instead. 316 // then you may have incorrect logic. Use compositingState() instead.
317 // FIXME: This is identical to null checking compositedLayerMapping(), why n ot just call that?
317 bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get (); } 318 bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get (); }
abarth-chromium 2014/08/08 15:34:19 Shawn's idea was to make all the call sites that w
chrishtr 2014/08/08 16:11:42 Let's get rid of hasCompositedLayerMapping in this
318 void clearCompositedLayerMapping(bool layerBeingDestroyed = false); 319 void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
319 CompositedLayerMapping* groupedMapping() const { return m_groupedMapping; } 320 CompositedLayerMapping* groupedMapping() const { return m_groupedMapping; }
320 void setGroupedMapping(CompositedLayerMapping* groupedMapping, bool layerBei ngDestroyed = false); 321 void setGroupedMapping(CompositedLayerMapping* groupedMapping, bool layerBei ngDestroyed = false);
321 322
322 bool hasCompositedMask() const; 323 bool hasCompositedMask() const;
323 bool hasCompositedClippingMask() const; 324 bool hasCompositedClippingMask() const;
324 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); } 325 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); }
325 326
326 bool clipsCompositingDescendantsWithBorderRadius() const; 327 bool clipsCompositingDescendantsWithBorderRadius() const;
327 328
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 773
773 } // namespace blink 774 } // namespace blink
774 775
775 #ifndef NDEBUG 776 #ifndef NDEBUG
776 // Outside the WebCore namespace for ease of invocation from gdb. 777 // Outside the WebCore namespace for ease of invocation from gdb.
777 void showLayerTree(const blink::RenderLayer*); 778 void showLayerTree(const blink::RenderLayer*);
778 void showLayerTree(const blink::RenderObject*); 779 void showLayerTree(const blink::RenderObject*);
779 #endif 780 #endif
780 781
781 #endif // RenderLayer_h 782 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698