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

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

Issue 58543002: Use a boolean hasCompositedLayerMapping() accessor instead of the pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 1 month 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 bool hasBlendMode() const; 339 bool hasBlendMode() const;
340 bool paintsWithBlendMode() const { return hasBlendMode() && compositingState () != PaintsIntoOwnBacking; } 340 bool paintsWithBlendMode() const { return hasBlendMode() && compositingState () != PaintsIntoOwnBacking; }
341 341
342 void* operator new(size_t); 342 void* operator new(size_t);
343 // Only safe to call from RenderLayerModelObject::destroyLayer() 343 // Only safe to call from RenderLayerModelObject::destroyLayer()
344 void operator delete(void*); 344 void operator delete(void*);
345 345
346 CompositingState compositingState() const; 346 CompositingState compositingState() const;
347 347
348 // NOTE: If you are accessing the CompositedLayerMapping as a boolean condit ion to determine the state of compositing for this layer, 348 bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get (); }
349 // then you may have incorrect logic. Use compositingState() instead. 349 // NOTE: If you are accessing the CompositedLayerMapping() as a boolean cond ition to determine the state of compositing for this layer,
350 // then you may have incorrect logic. Use compositingState() instead, or if you really know you just care about the existence of
351 // compositedLayerMapping versus the compositing state, use hasCompositedLay erMapping() instead.
350 CompositedLayerMapping* compositedLayerMapping() const { return m_composited LayerMapping.get(); } 352 CompositedLayerMapping* compositedLayerMapping() const { return m_composited LayerMapping.get(); }
351 CompositedLayerMapping* ensureCompositedLayerMapping(); 353 CompositedLayerMapping* ensureCompositedLayerMapping();
352 void clearCompositedLayerMapping(bool layerBeingDestroyed = false); 354 void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
353 355
354 bool hasCompositedMask() const; 356 bool hasCompositedMask() const;
355 bool hasCompositedClippingMask() const; 357 bool hasCompositedClippingMask() const;
356 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); } 358 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); }
357 359
358 RenderLayer* scrollParent() const; 360 RenderLayer* scrollParent() const;
359 RenderLayer* clipParent() const; 361 RenderLayer* clipParent() const;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 733
732 } // namespace WebCore 734 } // namespace WebCore
733 735
734 #ifndef NDEBUG 736 #ifndef NDEBUG
735 // Outside the WebCore namespace for ease of invocation from gdb. 737 // Outside the WebCore namespace for ease of invocation from gdb.
736 void showLayerTree(const WebCore::RenderLayer*); 738 void showLayerTree(const WebCore::RenderLayer*);
737 void showLayerTree(const WebCore::RenderObject*); 739 void showLayerTree(const WebCore::RenderObject*);
738 #endif 740 #endif
739 741
740 #endif // RenderLayer_h 742 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698