| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 ClipRects* previousPaintingClipRects() const { return m_previousPaintingClip
Rects.get(); } | 662 ClipRects* previousPaintingClipRects() const { return m_previousPaintingClip
Rects.get(); } |
| 663 void setPreviousPaintingClipRects(ClipRects& clipRects) { m_previousPainting
ClipRects = &clipRects; } | 663 void setPreviousPaintingClipRects(ClipRects& clipRects) { m_previousPainting
ClipRects = &clipRects; } |
| 664 | 664 |
| 665 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect;
} | 665 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect;
} |
| 666 void setPreviousPaintDirtyRect(const LayoutRect& rect) { m_previousPaintDirt
yRect = rect; } | 666 void setPreviousPaintDirtyRect(const LayoutRect& rect) { m_previousPaintDirt
yRect = rect; } |
| 667 | 667 |
| 668 PaintLayerPainter::PaintResult previousPaintResult() const { return static_c
ast<PaintLayerPainter::PaintResult>(m_previousPaintResult); } | 668 PaintLayerPainter::PaintResult previousPaintResult() const { return static_c
ast<PaintLayerPainter::PaintResult>(m_previousPaintResult); } |
| 669 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { m_previ
ousPaintResult = static_cast<unsigned>(result); ASSERT(m_previousPaintResult ==
static_cast<unsigned>(result)); } | 669 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { m_previ
ousPaintResult = static_cast<unsigned>(result); ASSERT(m_previousPaintResult ==
static_cast<unsigned>(result)); } |
| 670 | 670 |
| 671 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never
had descendant outlines. | 671 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never
had descendant outlines. |
| 672 // The flag is set during paint invalidation on a self painting layer if any
contained object has outline. | 672 // Once it's set we never clear it because it's not easy to track if all out
lines have been removed. |
| 673 // It's cleared during painting if PaintPhaseDescendantOutlinesOnly painted
nothing. | 673 bool needsPaintPhaseDescendantOutlines() const { return m_needsPaintPhaseDes
cendantOutlines; } |
| 674 bool needsPaintPhaseDescendantOutlines() const { return m_needsPaintPhaseDes
cendantOutlines && !m_previousPaintPhaseDescendantOutlinesWasEmpty; } | 674 void setNeedsPaintPhaseDescendantOutlines() { ASSERT(isSelfPaintingLayer());
m_needsPaintPhaseDescendantOutlines = true; } |
| 675 void setNeedsPaintPhaseDescendantOutlines() | |
| 676 { | |
| 677 ASSERT(isSelfPaintingLayer()); | |
| 678 m_needsPaintPhaseDescendantOutlines = true; | |
| 679 m_previousPaintPhaseDescendantOutlinesWasEmpty = false; | |
| 680 } | |
| 681 void setPreviousPaintPhaseDescendantOutlinesEmpty(bool isEmpty) { m_previous
PaintPhaseDescendantOutlinesWasEmpty = isEmpty; } | |
| 682 | 675 |
| 683 // Similar to above, but for PaintPhaseFloat. | 676 // Similar to above, but for PaintPhaseFloat. |
| 684 bool needsPaintPhaseFloat() const { return m_needsPaintPhaseFloat && !m_prev
iousPaintPhaseFloatWasEmpty; } | 677 bool needsPaintPhaseFloat() const { return m_needsPaintPhaseFloat; } |
| 685 void setNeedsPaintPhaseFloat() | 678 void setNeedsPaintPhaseFloat() { ASSERT(isSelfPaintingLayer()); m_needsPaint
PhaseFloat = true; } |
| 686 { | |
| 687 ASSERT(isSelfPaintingLayer()); | |
| 688 m_needsPaintPhaseFloat = true; | |
| 689 m_previousPaintPhaseFloatWasEmpty = false; | |
| 690 } | |
| 691 void setPreviousPaintPhaseFloatEmpty(bool isEmpty) { m_previousPaintPhaseFlo
atWasEmpty= isEmpty; } | |
| 692 | 679 |
| 693 // Similar to above, but for PaintPhaseDescendantBlockBackgroundsOnly. | 680 bool needsPaintPhaseDescendantBlockBackgrounds() const { return m_needsPaint
PhaseDescendantBlockBackgrounds; } |
| 694 bool needsPaintPhaseDescendantBlockBackgrounds() const { return m_needsPaint
PhaseDescendantBlockBackgrounds && !m_previousPaintPhaseDescendantBlockBackgroun
dsWasEmpty; } | 681 void setNeedsPaintPhaseDescendantBlockBackgrounds() { ASSERT(isSelfPaintingL
ayer()); m_needsPaintPhaseDescendantBlockBackgrounds = true; } |
| 695 void setNeedsPaintPhaseDescendantBlockBackgrounds() | |
| 696 { | |
| 697 ASSERT(isSelfPaintingLayer()); | |
| 698 m_needsPaintPhaseDescendantBlockBackgrounds = true; | |
| 699 m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty = false; | |
| 700 } | |
| 701 void setPreviousPaintPhaseDescendantBlockBackgroundsEmpty(bool isEmpty) { m_
previousPaintPhaseDescendantBlockBackgroundsWasEmpty = isEmpty; } | |
| 702 | 682 |
| 703 PaintTiming* paintTiming(); | 683 PaintTiming* paintTiming(); |
| 704 | 684 |
| 705 ClipRectsCache* clipRectsCache() const { return m_clipRectsCache.get(); } | 685 ClipRectsCache* clipRectsCache() const { return m_clipRectsCache.get(); } |
| 706 ClipRectsCache& ensureClipRectsCache() const | 686 ClipRectsCache& ensureClipRectsCache() const |
| 707 { | 687 { |
| 708 if (!m_clipRectsCache) | 688 if (!m_clipRectsCache) |
| 709 m_clipRectsCache = adoptPtr(new ClipRectsCache); | 689 m_clipRectsCache = adoptPtr(new ClipRectsCache); |
| 710 return *m_clipRectsCache; | 690 return *m_clipRectsCache; |
| 711 } | 691 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 unsigned m_shouldIsolateCompositedDescendants : 1; | 820 unsigned m_shouldIsolateCompositedDescendants : 1; |
| 841 | 821 |
| 842 // True if this layout layer just lost its grouped mapping due to the Compos
itedLayerMapping being destroyed, | 822 // True if this layout layer just lost its grouped mapping due to the Compos
itedLayerMapping being destroyed, |
| 843 // and we don't yet know to what graphics layer this Layer will be assigned. | 823 // and we don't yet know to what graphics layer this Layer will be assigned. |
| 844 unsigned m_lostGroupedMapping : 1; | 824 unsigned m_lostGroupedMapping : 1; |
| 845 | 825 |
| 846 unsigned m_needsRepaint : 1; | 826 unsigned m_needsRepaint : 1; |
| 847 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult | 827 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult |
| 848 | 828 |
| 849 unsigned m_needsPaintPhaseDescendantOutlines : 1; | 829 unsigned m_needsPaintPhaseDescendantOutlines : 1; |
| 850 unsigned m_previousPaintPhaseDescendantOutlinesWasEmpty : 1; | |
| 851 unsigned m_needsPaintPhaseFloat : 1; | 830 unsigned m_needsPaintPhaseFloat : 1; |
| 852 unsigned m_previousPaintPhaseFloatWasEmpty : 1; | |
| 853 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; | 831 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; |
| 854 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1; | |
| 855 | 832 |
| 856 // These bitfields are part of ancestor/descendant dependent compositing inp
uts. | 833 // These bitfields are part of ancestor/descendant dependent compositing inp
uts. |
| 857 unsigned m_hasDescendantWithClipPath : 1; | 834 unsigned m_hasDescendantWithClipPath : 1; |
| 858 unsigned m_hasNonIsolatedDescendantWithBlendMode : 1; | 835 unsigned m_hasNonIsolatedDescendantWithBlendMode : 1; |
| 859 unsigned m_hasAncestorWithClipPath : 1; | 836 unsigned m_hasAncestorWithClipPath : 1; |
| 860 | 837 |
| 861 LayoutBoxModelObject* m_layoutObject; | 838 LayoutBoxModelObject* m_layoutObject; |
| 862 | 839 |
| 863 PaintLayer* m_parent; | 840 PaintLayer* m_parent; |
| 864 PaintLayer* m_previous; | 841 PaintLayer* m_previous; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 | 874 |
| 898 } // namespace blink | 875 } // namespace blink |
| 899 | 876 |
| 900 #ifndef NDEBUG | 877 #ifndef NDEBUG |
| 901 // Outside the WebCore namespace for ease of invocation from gdb. | 878 // Outside the WebCore namespace for ease of invocation from gdb. |
| 902 void showLayerTree(const blink::PaintLayer*); | 879 void showLayerTree(const blink::PaintLayer*); |
| 903 void showLayerTree(const blink::LayoutObject*); | 880 void showLayerTree(const blink::LayoutObject*); |
| 904 #endif | 881 #endif |
| 905 | 882 |
| 906 #endif // Layer_h | 883 #endif // Layer_h |
| OLD | NEW |