Chromium Code Reviews| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 } | 309 } |
| 310 #endif | 310 #endif |
| 311 | 311 |
| 312 // True if the client is non-null. Because m_client is const, this should | 312 // True if the client is non-null. Because m_client is const, this should |
| 313 // never be false except when we explicitly create a tombstone/"dead display | 313 // never be false except when we explicitly create a tombstone/"dead display |
| 314 // item" as part of moving an item from one list to another (see: | 314 // item" as part of moving an item from one list to another (see: |
| 315 // DisplayItemList::appendByMoving). | 315 // DisplayItemList::appendByMoving). |
| 316 bool hasValidClient() const { return m_client; } | 316 bool hasValidClient() const { return m_client; } |
| 317 | 317 |
| 318 virtual bool drawsContent() const { return false; } | 318 virtual bool drawsContent() const { return false; } |
| 319 virtual bool isBeginCompositingDisplayItem() const { return false; } | |
|
Xianzhu
2016/07/27 17:22:29
You can avoid this virtual function by using "disp
| |
| 319 | 320 |
| 320 // Override to implement specific analysis strategies. | 321 // Override to implement specific analysis strategies. |
| 321 virtual void analyzeForGpuRasterization(SkPictureGpuAnalyzer&) const { } | 322 virtual void analyzeForGpuRasterization(SkPictureGpuAnalyzer&) const { } |
| 322 | 323 |
| 323 #ifndef NDEBUG | 324 #ifndef NDEBUG |
| 324 static WTF::String typeAsDebugString(DisplayItem::Type); | 325 static WTF::String typeAsDebugString(DisplayItem::Type); |
| 325 const WTF::String clientDebugString() const { return m_clientDebugString; } | 326 const WTF::String clientDebugString() const { return m_clientDebugString; } |
| 326 void setClientDebugString(const WTF::String& s) { m_clientDebugString = s; } | 327 void setClientDebugString(const WTF::String& s) { m_clientDebugString = s; } |
| 327 WTF::String asDebugString() const; | 328 WTF::String asDebugString() const; |
| 328 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const; | 329 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; | 379 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; |
| 379 #endif | 380 #endif |
| 380 | 381 |
| 381 private: | 382 private: |
| 382 bool isEnd() const final { return true; } | 383 bool isEnd() const final { return true; } |
| 383 }; | 384 }; |
| 384 | 385 |
| 385 } // namespace blink | 386 } // namespace blink |
| 386 | 387 |
| 387 #endif // DisplayItem_h | 388 #endif // DisplayItem_h |
| OLD | NEW |