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