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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "core/CoreExport.h" | 48 #include "core/CoreExport.h" |
49 #include "core/layout/ClipRectsCache.h" | 49 #include "core/layout/ClipRectsCache.h" |
50 #include "core/layout/LayoutBox.h" | 50 #include "core/layout/LayoutBox.h" |
51 #include "core/paint/PaintLayerClipper.h" | 51 #include "core/paint/PaintLayerClipper.h" |
52 #include "core/paint/PaintLayerFilterInfo.h" | 52 #include "core/paint/PaintLayerFilterInfo.h" |
53 #include "core/paint/PaintLayerFragment.h" | 53 #include "core/paint/PaintLayerFragment.h" |
54 #include "core/paint/PaintLayerPainter.h" | 54 #include "core/paint/PaintLayerPainter.h" |
55 #include "core/paint/PaintLayerScrollableArea.h" | 55 #include "core/paint/PaintLayerScrollableArea.h" |
56 #include "core/paint/PaintLayerStackingNode.h" | 56 #include "core/paint/PaintLayerStackingNode.h" |
57 #include "core/paint/PaintLayerStackingNodeIterator.h" | 57 #include "core/paint/PaintLayerStackingNodeIterator.h" |
| 58 #include "core/paint/PaintResult.h" |
58 #include "platform/graphics/CompositingReasons.h" | 59 #include "platform/graphics/CompositingReasons.h" |
59 #include "platform/graphics/SquashingDisallowedReasons.h" | 60 #include "platform/graphics/SquashingDisallowedReasons.h" |
60 #include "wtf/Allocator.h" | 61 #include "wtf/Allocator.h" |
61 #include "wtf/AutoReset.h" | 62 #include "wtf/AutoReset.h" |
62 #include "wtf/PtrUtil.h" | 63 #include "wtf/PtrUtil.h" |
63 #include <memory> | 64 #include <memory> |
64 | 65 |
65 namespace blink { | 66 namespace blink { |
66 | 67 |
67 class CompositedLayerMapping; | 68 class CompositedLayerMapping; |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 } | 901 } |
901 void setPreviousPaintingClipRects(ClipRects& clipRects) { | 902 void setPreviousPaintingClipRects(ClipRects& clipRects) { |
902 m_previousPaintingClipRects = &clipRects; | 903 m_previousPaintingClipRects = &clipRects; |
903 } | 904 } |
904 | 905 |
905 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; } | 906 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; } |
906 void setPreviousPaintDirtyRect(const LayoutRect& rect) { | 907 void setPreviousPaintDirtyRect(const LayoutRect& rect) { |
907 m_previousPaintDirtyRect = rect; | 908 m_previousPaintDirtyRect = rect; |
908 } | 909 } |
909 | 910 |
910 PaintLayerPainter::PaintResult previousPaintResult() const { | 911 PaintResult previousPaintResult() const { |
911 return static_cast<PaintLayerPainter::PaintResult>(m_previousPaintResult); | 912 return static_cast<PaintResult>(m_previousPaintResult); |
912 } | 913 } |
913 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { | 914 void setPreviousPaintResult(PaintResult result) { |
914 m_previousPaintResult = static_cast<unsigned>(result); | 915 m_previousPaintResult = static_cast<unsigned>(result); |
915 DCHECK(m_previousPaintResult == static_cast<unsigned>(result)); | 916 DCHECK(m_previousPaintResult == static_cast<unsigned>(result)); |
916 } | 917 } |
917 | 918 |
918 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never | 919 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never |
919 // had descendant outlines. The flag is set during paint invalidation on a | 920 // had descendant outlines. The flag is set during paint invalidation on a |
920 // self painting layer if any contained object has outline. It's cleared | 921 // self painting layer if any contained object has outline. It's cleared |
921 // during painting if PaintPhaseDescendantOutlinesOnly painted nothing. | 922 // during painting if PaintPhaseDescendantOutlinesOnly painted nothing. |
922 // For more details, see core/paint/REAME.md#Empty paint phase optimization. | 923 // For more details, see core/paint/REAME.md#Empty paint phase optimization. |
923 bool needsPaintPhaseDescendantOutlines() const { | 924 bool needsPaintPhaseDescendantOutlines() const { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 | 1156 |
1156 // Should be for stacking contexts having unisolated blending descendants. | 1157 // Should be for stacking contexts having unisolated blending descendants. |
1157 unsigned m_shouldIsolateCompositedDescendants : 1; | 1158 unsigned m_shouldIsolateCompositedDescendants : 1; |
1158 | 1159 |
1159 // True if this layout layer just lost its grouped mapping due to the | 1160 // True if this layout layer just lost its grouped mapping due to the |
1160 // CompositedLayerMapping being destroyed, and we don't yet know to what | 1161 // CompositedLayerMapping being destroyed, and we don't yet know to what |
1161 // graphics layer this Layer will be assigned. | 1162 // graphics layer this Layer will be assigned. |
1162 unsigned m_lostGroupedMapping : 1; | 1163 unsigned m_lostGroupedMapping : 1; |
1163 | 1164 |
1164 unsigned m_needsRepaint : 1; | 1165 unsigned m_needsRepaint : 1; |
1165 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult | 1166 unsigned m_previousPaintResult : 1; // PaintResult |
| 1167 static_assert(MaxPaintResult <= 2, |
| 1168 "Should update number of bits of m_previousPaintResult"); |
1166 | 1169 |
1167 unsigned m_needsPaintPhaseDescendantOutlines : 1; | 1170 unsigned m_needsPaintPhaseDescendantOutlines : 1; |
1168 unsigned m_previousPaintPhaseDescendantOutlinesWasEmpty : 1; | 1171 unsigned m_previousPaintPhaseDescendantOutlinesWasEmpty : 1; |
1169 unsigned m_needsPaintPhaseFloat : 1; | 1172 unsigned m_needsPaintPhaseFloat : 1; |
1170 unsigned m_previousPaintPhaseFloatWasEmpty : 1; | 1173 unsigned m_previousPaintPhaseFloatWasEmpty : 1; |
1171 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; | 1174 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; |
1172 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1; | 1175 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1; |
1173 | 1176 |
1174 // These bitfields are part of ancestor/descendant dependent compositing | 1177 // These bitfields are part of ancestor/descendant dependent compositing |
1175 // inputs. | 1178 // inputs. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 | 1224 |
1222 } // namespace blink | 1225 } // namespace blink |
1223 | 1226 |
1224 #ifndef NDEBUG | 1227 #ifndef NDEBUG |
1225 // Outside the WebCore namespace for ease of invocation from gdb. | 1228 // Outside the WebCore namespace for ease of invocation from gdb. |
1226 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); | 1229 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); |
1227 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); | 1230 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); |
1228 #endif | 1231 #endif |
1229 | 1232 |
1230 #endif // Layer_h | 1233 #endif // Layer_h |
OLD | NEW |