| 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 } | 918 } |
| 918 void setPreviousPaintingClipRects(ClipRects& clipRects) { | 919 void setPreviousPaintingClipRects(ClipRects& clipRects) { |
| 919 m_previousPaintingClipRects = &clipRects; | 920 m_previousPaintingClipRects = &clipRects; |
| 920 } | 921 } |
| 921 | 922 |
| 922 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; } | 923 LayoutRect previousPaintDirtyRect() const { return m_previousPaintDirtyRect; } |
| 923 void setPreviousPaintDirtyRect(const LayoutRect& rect) { | 924 void setPreviousPaintDirtyRect(const LayoutRect& rect) { |
| 924 m_previousPaintDirtyRect = rect; | 925 m_previousPaintDirtyRect = rect; |
| 925 } | 926 } |
| 926 | 927 |
| 927 PaintLayerPainter::PaintResult previousPaintResult() const { | 928 PaintResult previousPaintResult() const { |
| 928 return static_cast<PaintLayerPainter::PaintResult>(m_previousPaintResult); | 929 return static_cast<PaintResult>(m_previousPaintResult); |
| 929 } | 930 } |
| 930 void setPreviousPaintResult(PaintLayerPainter::PaintResult result) { | 931 void setPreviousPaintResult(PaintResult result) { |
| 931 m_previousPaintResult = static_cast<unsigned>(result); | 932 m_previousPaintResult = static_cast<unsigned>(result); |
| 932 DCHECK(m_previousPaintResult == static_cast<unsigned>(result)); | 933 DCHECK(m_previousPaintResult == static_cast<unsigned>(result)); |
| 933 } | 934 } |
| 934 | 935 |
| 935 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never | 936 // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never |
| 936 // had descendant outlines. The flag is set during paint invalidation on a | 937 // had descendant outlines. The flag is set during paint invalidation on a |
| 937 // self painting layer if any contained object has outline. It's cleared | 938 // self painting layer if any contained object has outline. It's cleared |
| 938 // during painting if PaintPhaseDescendantOutlinesOnly painted nothing. | 939 // during painting if PaintPhaseDescendantOutlinesOnly painted nothing. |
| 939 // For more details, see core/paint/REAME.md#Empty paint phase optimization. | 940 // For more details, see core/paint/REAME.md#Empty paint phase optimization. |
| 940 bool needsPaintPhaseDescendantOutlines() const { | 941 bool needsPaintPhaseDescendantOutlines() const { |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 | 1176 |
| 1176 // Should be for stacking contexts having unisolated blending descendants. | 1177 // Should be for stacking contexts having unisolated blending descendants. |
| 1177 unsigned m_shouldIsolateCompositedDescendants : 1; | 1178 unsigned m_shouldIsolateCompositedDescendants : 1; |
| 1178 | 1179 |
| 1179 // True if this layout layer just lost its grouped mapping due to the | 1180 // True if this layout layer just lost its grouped mapping due to the |
| 1180 // CompositedLayerMapping being destroyed, and we don't yet know to what | 1181 // CompositedLayerMapping being destroyed, and we don't yet know to what |
| 1181 // graphics layer this Layer will be assigned. | 1182 // graphics layer this Layer will be assigned. |
| 1182 unsigned m_lostGroupedMapping : 1; | 1183 unsigned m_lostGroupedMapping : 1; |
| 1183 | 1184 |
| 1184 unsigned m_needsRepaint : 1; | 1185 unsigned m_needsRepaint : 1; |
| 1185 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult | 1186 unsigned m_previousPaintResult : 1; // PaintResult |
| 1187 static_assert(MaxPaintResult <= 2, |
| 1188 "Should update number of bits of m_previousPaintResult"); |
| 1186 | 1189 |
| 1187 unsigned m_needsPaintPhaseDescendantOutlines : 1; | 1190 unsigned m_needsPaintPhaseDescendantOutlines : 1; |
| 1188 unsigned m_previousPaintPhaseDescendantOutlinesWasEmpty : 1; | 1191 unsigned m_previousPaintPhaseDescendantOutlinesWasEmpty : 1; |
| 1189 unsigned m_needsPaintPhaseFloat : 1; | 1192 unsigned m_needsPaintPhaseFloat : 1; |
| 1190 unsigned m_previousPaintPhaseFloatWasEmpty : 1; | 1193 unsigned m_previousPaintPhaseFloatWasEmpty : 1; |
| 1191 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; | 1194 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; |
| 1192 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1; | 1195 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1; |
| 1193 | 1196 |
| 1194 // These bitfields are part of ancestor/descendant dependent compositing | 1197 // These bitfields are part of ancestor/descendant dependent compositing |
| 1195 // inputs. | 1198 // inputs. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 | 1245 |
| 1243 } // namespace blink | 1246 } // namespace blink |
| 1244 | 1247 |
| 1245 #ifndef NDEBUG | 1248 #ifndef NDEBUG |
| 1246 // Outside the WebCore namespace for ease of invocation from gdb. | 1249 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1247 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); | 1250 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); |
| 1248 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); | 1251 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); |
| 1249 #endif | 1252 #endif |
| 1250 | 1253 |
| 1251 #endif // Layer_h | 1254 #endif // Layer_h |
| OLD | NEW |