| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DisplayItem_h | 5 #ifndef DisplayItem_h |
| 6 #define DisplayItem_h | 6 #define DisplayItem_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/graphics/paint/DisplayItemClient.h" | 9 #include "platform/graphics/paint/DisplayItemClient.h" |
| 10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 EndScrollLast = EndScrollFirst + ScrollLast - ScrollFirst, | 114 EndScrollLast = EndScrollFirst + ScrollLast - ScrollFirst, |
| 115 | 115 |
| 116 BeginFilter, | 116 BeginFilter, |
| 117 EndFilter, | 117 EndFilter, |
| 118 BeginCompositing, | 118 BeginCompositing, |
| 119 EndCompositing, | 119 EndCompositing, |
| 120 BeginTransform, | 120 BeginTransform, |
| 121 EndTransform, | 121 EndTransform, |
| 122 BeginClipPath, | 122 BeginClipPath, |
| 123 EndClipPath, | 123 EndClipPath, |
| 124 |
| 125 SubtreeCachedFirst, |
| 126 SubtreeCachedPaintPhaseFirst = SubtreeCachedFirst, |
| 127 SubtreeCachedPaintPhaseLast = SubtreeCachedPaintPhaseFirst + PaintPhaseM
ax, |
| 128 SubtreeCachedLast = SubtreeCachedPaintPhaseLast, |
| 129 |
| 130 BeginSubtreeFirst, |
| 131 BeginSubtreePaintPhaseFirst = BeginSubtreeFirst, |
| 132 BeginSubtreePaintPhaseLast = BeginSubtreePaintPhaseFirst + PaintPhaseMax
, |
| 133 BeginSubtreeLast = BeginSubtreePaintPhaseLast, |
| 134 |
| 135 EndSubtreeFirst, |
| 136 EndSubtreePaintPhaseFirst = EndSubtreeFirst, |
| 137 EndSubtreePaintPhaseLast = EndSubtreePaintPhaseFirst + PaintPhaseMax, |
| 138 EndSubtreeLast = EndSubtreePaintPhaseLast, |
| 124 }; | 139 }; |
| 125 | 140 |
| 126 // Create a dummy display item which just holds the id but has no display op
eration. | |
| 127 // It helps a CachedDisplayItem to match the corresponding original empty di
splay item. | |
| 128 static PassOwnPtr<DisplayItem> create(DisplayItemClient client, Type type) {
return adoptPtr(new DisplayItem(client, type)); } | |
| 129 | |
| 130 virtual ~DisplayItem() { } | 141 virtual ~DisplayItem() { } |
| 131 | 142 |
| 132 virtual void replay(GraphicsContext*) { } | 143 virtual void replay(GraphicsContext*) { } |
| 133 | 144 |
| 134 DisplayItemClient client() const { return m_id.client; } | 145 DisplayItemClient client() const { return m_id.client; } |
| 135 Type type() const { return m_id.type; } | 146 Type type() const { return m_id.type; } |
| 136 bool idsEqual(const DisplayItem& other) const { return m_id.client == other.
m_id.client && m_id.type == other.m_id.type; } | 147 bool idsEqual(const DisplayItem& other) const { return m_id.client == other.
m_id.client && m_id.type == other.m_id.type; } |
| 137 | 148 |
| 138 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const { } | 149 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const { } |
| 139 | 150 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipLayerFragment) | 189 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipLayerFragment) |
| 179 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipBox) | 190 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipBox) |
| 180 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds) | 191 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds) |
| 181 | 192 |
| 182 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip) | 193 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip) |
| 183 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip) | 194 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip) |
| 184 | 195 |
| 185 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll) | 196 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll) |
| 186 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) | 197 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) |
| 187 | 198 |
| 199 DEFINE_CATEGORY_METHODS(SubtreeCached) |
| 200 DEFINE_PAINT_PHASE_CONVERSION_METHOD(SubtreeCached) |
| 201 DEFINE_CATEGORY_METHODS(BeginSubtree) |
| 202 DEFINE_PAINT_PHASE_CONVERSION_METHOD(BeginSubtree) |
| 203 DEFINE_CATEGORY_METHODS(EndSubtree) |
| 204 DEFINE_PAINT_PHASE_CONVERSION_METHOD(EndSubtree) |
| 205 DEFINE_CONVERSION_METHODS(SubtreeCached, subtreeCached, BeginSubtree, beginS
ubtree) |
| 206 DEFINE_CONVERSION_METHODS(SubtreeCached, subtreeCached, EndSubtree, endSubtr
ee) |
| 207 DEFINE_CONVERSION_METHODS(BeginSubtree, beginSubtree, EndSubtree, endSubtree
) |
| 208 |
| 188 virtual bool isBegin() const { return false; } | 209 virtual bool isBegin() const { return false; } |
| 189 virtual bool isEnd() const { return false; } | 210 virtual bool isEnd() const { return false; } |
| 190 | 211 |
| 191 #if ENABLE(ASSERT) | 212 #if ENABLE(ASSERT) |
| 192 virtual bool isEndAndPairedWith(const DisplayItem& other) const { return fal
se; } | 213 virtual bool isEndAndPairedWith(const DisplayItem& other) const { return fal
se; } |
| 193 #endif | 214 #endif |
| 194 | 215 |
| 195 #ifndef NDEBUG | 216 #ifndef NDEBUG |
| 196 static WTF::String typeAsDebugString(DisplayItem::Type); | 217 static WTF::String typeAsDebugString(DisplayItem::Type); |
| 197 | 218 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 virtual bool isEndAndPairedWith(const DisplayItem& other) const override = 0
; | 263 virtual bool isEndAndPairedWith(const DisplayItem& other) const override = 0
; |
| 243 #endif | 264 #endif |
| 244 | 265 |
| 245 private: | 266 private: |
| 246 virtual bool isEnd() const override final { return true; } | 267 virtual bool isEnd() const override final { return true; } |
| 247 }; | 268 }; |
| 248 | 269 |
| 249 } // namespace blink | 270 } // namespace blink |
| 250 | 271 |
| 251 #endif // DisplayItem_h | 272 #endif // DisplayItem_h |
| OLD | NEW |