OLD | NEW |
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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 455 |
456 void filterNeedsRepaint(); | 456 void filterNeedsRepaint(); |
457 bool hasFilter() const { return renderer()->hasFilter(); } | 457 bool hasFilter() const { return renderer()->hasFilter(); } |
458 | 458 |
459 bool hasBlendMode() const; | 459 bool hasBlendMode() const; |
460 | 460 |
461 void* operator new(size_t); | 461 void* operator new(size_t); |
462 // Only safe to call from RenderLayerModelObject::destroyLayer() | 462 // Only safe to call from RenderLayerModelObject::destroyLayer() |
463 void operator delete(void*); | 463 void operator delete(void*); |
464 | 464 |
465 bool isComposited() const { return m_backing != 0; } | 465 CompositingState compositingState() const; |
| 466 |
| 467 RenderLayerBacking* backing() const |
| 468 { |
| 469 // NOTE: Checking whether backing exists is equivalent to asking if you
are in one of these two compositing states. |
| 470 // If this is why you are using backing(), please try to use compo
sitingState() instead. |
| 471 ASSERT(compositingState() == HasOwnBackingButPaintsIntoAncestor || compo
sitingState() == PaintsIntoOwnBacking); |
| 472 return m_backing.get(); |
| 473 } |
| 474 |
| 475 RenderLayerBacking* ensureBacking(); |
| 476 void clearBacking(bool layerBeingDestroyed = false); |
| 477 |
466 bool hasCompositedMask() const; | 478 bool hasCompositedMask() const; |
467 bool hasCompositedClippingMask() const; | 479 bool hasCompositedClippingMask() const; |
468 RenderLayerBacking* backing() const { return m_backing.get(); } | |
469 RenderLayerBacking* ensureBacking(); | |
470 void clearBacking(bool layerBeingDestroyed = false); | |
471 bool needsCompositedScrolling() const; | 480 bool needsCompositedScrolling() const; |
472 bool needsToBeStackingContainer() const; | 481 bool needsToBeStackingContainer() const; |
473 | 482 |
474 RenderLayer* scrollParent() const; | 483 RenderLayer* scrollParent() const; |
475 RenderLayer* clipParent() const; | 484 RenderLayer* clipParent() const; |
476 | 485 |
477 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; | 486 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const
RenderStyle* newStyle) const; |
478 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle) const; | 487 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c
onst RenderStyle* newStyle) const; |
479 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co
nst RenderStyle* newStyle, bool didPaintWithFilters) const; | 488 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co
nst RenderStyle* newStyle, bool didPaintWithFilters) const; |
480 | 489 |
481 bool paintsWithTransparency(PaintBehavior paintBehavior) const | 490 bool paintsWithTransparency(PaintBehavior paintBehavior) const |
482 { | 491 { |
483 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit
ingLayers) || !isComposited()); | 492 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit
ingLayers) || compositingState() != PaintsIntoOwnBacking); |
484 } | 493 } |
485 | 494 |
486 bool paintsWithTransform(PaintBehavior) const; | 495 bool paintsWithTransform(PaintBehavior) const; |
487 | 496 |
488 // Returns true if background phase is painted opaque in the given rect. | 497 // Returns true if background phase is painted opaque in the given rect. |
489 // The query rect is given in local coordinates. | 498 // The query rect is given in local coordinates. |
490 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; | 499 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; |
491 | 500 |
492 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } | 501 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } |
493 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } | 502 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 | 1013 |
1005 } // namespace WebCore | 1014 } // namespace WebCore |
1006 | 1015 |
1007 #ifndef NDEBUG | 1016 #ifndef NDEBUG |
1008 // Outside the WebCore namespace for ease of invocation from gdb. | 1017 // Outside the WebCore namespace for ease of invocation from gdb. |
1009 void showLayerTree(const WebCore::RenderLayer*); | 1018 void showLayerTree(const WebCore::RenderLayer*); |
1010 void showLayerTree(const WebCore::RenderObject*); | 1019 void showLayerTree(const WebCore::RenderObject*); |
1011 #endif | 1020 #endif |
1012 | 1021 |
1013 #endif // RenderLayer_h | 1022 #endif // RenderLayer_h |
OLD | NEW |