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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D) | 296 DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D) |
297 | 297 |
298 static bool isCacheableType(Type type) { return isDrawingType(type) || type
== kSubsequence; } | 298 static bool isCacheableType(Type type) { return isDrawingType(type) || type
== kSubsequence; } |
299 bool isCacheable() const { return !skippedCache() && isCacheableType(m_type)
; } | 299 bool isCacheable() const { return !skippedCache() && isCacheableType(m_type)
; } |
300 | 300 |
301 virtual bool isBegin() const { return false; } | 301 virtual bool isBegin() const { return false; } |
302 virtual bool isEnd() const { return false; } | 302 virtual bool isEnd() const { return false; } |
303 | 303 |
304 #if DCHECK_IS_ON() | 304 #if DCHECK_IS_ON() |
305 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const { return
false; } | 305 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const { return
false; } |
306 #endif | |
307 | |
308 virtual bool equals(const DisplayItem& other) const | 306 virtual bool equals(const DisplayItem& other) const |
309 { | 307 { |
310 return m_client == other.m_client | 308 return m_client == other.m_client |
311 && m_type == other.m_type | 309 && m_type == other.m_type |
312 && m_derivedSize == other.m_derivedSize | 310 && m_derivedSize == other.m_derivedSize |
313 && m_skippedCache == other.m_skippedCache; | 311 && m_skippedCache == other.m_skippedCache; |
314 } | 312 } |
| 313 #endif |
315 | 314 |
316 // True if the client is non-null. Because m_client is const, this should | 315 // True if the client is non-null. Because m_client is const, this should |
317 // never be false except when we explicitly create a tombstone/"dead display | 316 // never be false except when we explicitly create a tombstone/"dead display |
318 // item" as part of moving an item from one list to another (see: | 317 // item" as part of moving an item from one list to another (see: |
319 // DisplayItemList::appendByMoving). | 318 // DisplayItemList::appendByMoving). |
320 bool hasValidClient() const { return m_client; } | 319 bool hasValidClient() const { return m_client; } |
321 | 320 |
322 virtual bool drawsContent() const { return false; } | 321 virtual bool drawsContent() const { return false; } |
323 | 322 |
324 // Override to implement specific analysis strategies. | 323 // Override to implement specific analysis strategies. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; | 381 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; |
383 #endif | 382 #endif |
384 | 383 |
385 private: | 384 private: |
386 bool isEnd() const final { return true; } | 385 bool isEnd() const final { return true; } |
387 }; | 386 }; |
388 | 387 |
389 } // namespace blink | 388 } // namespace blink |
390 | 389 |
391 #endif // DisplayItem_h | 390 #endif // DisplayItem_h |
OLD | NEW |