| 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/ContiguousContainer.h" | 9 #include "platform/graphics/ContiguousContainer.h" |
| 10 #include "platform/graphics/paint/DisplayItemClient.h" | 10 #include "platform/graphics/paint/DisplayItemClient.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 kEndTransform3DFirst + kTransform3DLast - kTransform3DFirst, | 183 kEndTransform3DFirst + kTransform3DLast - kTransform3DFirst, |
| 184 | 184 |
| 185 kBeginFilter, | 185 kBeginFilter, |
| 186 kEndFilter, | 186 kEndFilter, |
| 187 kBeginCompositing, | 187 kBeginCompositing, |
| 188 kEndCompositing, | 188 kEndCompositing, |
| 189 kBeginTransform, | 189 kBeginTransform, |
| 190 kEndTransform, | 190 kEndTransform, |
| 191 kBeginClipPath, | 191 kBeginClipPath, |
| 192 kEndClipPath, | 192 kEndClipPath, |
| 193 | |
| 194 kSubsequence, | |
| 195 kEndSubsequence, | |
| 196 | |
| 197 kUninitializedType, | 193 kUninitializedType, |
| 198 kTypeLast = kUninitializedType | 194 kTypeLast = kUninitializedType |
| 199 }; | 195 }; |
| 200 | 196 |
| 201 static_assert(kTableCollapsedBorderBase >= kTableCollapsedBorderUnalignedBase, | 197 static_assert(kTableCollapsedBorderBase >= kTableCollapsedBorderUnalignedBase, |
| 202 "TableCollapsedBorder types overlap with other types"); | 198 "TableCollapsedBorder types overlap with other types"); |
| 203 static_assert((kTableCollapsedBorderBase & 0xf) == 0, | 199 static_assert((kTableCollapsedBorderBase & 0xf) == 0, |
| 204 "The lowest 4 bits of TableCollapsedBorderBase should be zero"); | 200 "The lowest 4 bits of TableCollapsedBorderBase should be zero"); |
| 205 // Bits or'ed onto TableCollapsedBorderBase to generate a real table collapsed | 201 // Bits or'ed onto TableCollapsedBorderBase to generate a real table collapsed |
| 206 // border type. | 202 // border type. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds) | 311 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds) |
| 316 | 312 |
| 317 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip) | 313 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip) |
| 318 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip) | 314 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip) |
| 319 | 315 |
| 320 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll) | 316 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll) |
| 321 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) | 317 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) |
| 322 | 318 |
| 323 DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D) | 319 DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D) |
| 324 | 320 |
| 325 static bool isCacheableType(Type type) { | 321 static bool isCacheableType(Type type) { return isDrawingType(type); } |
| 326 return isDrawingType(type) || type == kSubsequence; | |
| 327 } | |
| 328 bool isCacheable() const { | 322 bool isCacheable() const { |
| 329 return !skippedCache() && isCacheableType(m_type); | 323 return !skippedCache() && isCacheableType(m_type); |
| 330 } | 324 } |
| 331 | 325 |
| 332 virtual bool isBegin() const { return false; } | 326 virtual bool isBegin() const { return false; } |
| 333 virtual bool isEnd() const { return false; } | 327 virtual bool isEnd() const { return false; } |
| 334 | 328 |
| 335 #if DCHECK_IS_ON() | 329 #if DCHECK_IS_ON() |
| 336 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const { | 330 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const { |
| 337 return false; | 331 return false; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; | 412 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; |
| 419 #endif | 413 #endif |
| 420 | 414 |
| 421 private: | 415 private: |
| 422 bool isEnd() const final { return true; } | 416 bool isEnd() const final { return true; } |
| 423 }; | 417 }; |
| 424 | 418 |
| 425 } // namespace blink | 419 } // namespace blink |
| 426 | 420 |
| 427 #endif // DisplayItem_h | 421 #endif // DisplayItem_h |
| OLD | NEW |