OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SubtreeDisplayItem_h |
| 6 #define SubtreeDisplayItem_h |
| 7 |
| 8 #include "platform/geometry/FloatRect.h" |
| 9 #include "platform/graphics/paint/DisplayItem.h" |
| 10 #include "wtf/Assertions.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class PLATFORM_EXPORT SubtreeCachedDisplayItem : public DisplayItem { |
| 15 WTF_MAKE_FAST_ALLOCATED; |
| 16 public: |
| 17 static PassOwnPtr<SubtreeCachedDisplayItem> create(DisplayItemClient client,
Type type) |
| 18 { |
| 19 return adoptPtr(new SubtreeCachedDisplayItem(client, type)); |
| 20 } |
| 21 |
| 22 private: |
| 23 SubtreeCachedDisplayItem(DisplayItemClient client, Type type) : DisplayItem(
client, type) { } |
| 24 |
| 25 virtual bool isSubtreeCached() const final { return true; } |
| 26 virtual void replay(GraphicsContext*) final { ASSERT_NOT_REACHED(); } |
| 27 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const final { A
SSERT_NOT_REACHED(); } |
| 28 |
| 29 #ifndef NDEBUG |
| 30 virtual const char* name() const override { return "SubtreeCached"; } |
| 31 #endif |
| 32 }; |
| 33 |
| 34 class PLATFORM_EXPORT BeginSubtreeDisplayItem : public DisplayItem { |
| 35 WTF_MAKE_FAST_ALLOCATED; |
| 36 public: |
| 37 static PassOwnPtr<BeginSubtreeDisplayItem> create(DisplayItemClient client,
Type type) |
| 38 { |
| 39 return adoptPtr(new BeginSubtreeDisplayItem(client, type)); |
| 40 } |
| 41 |
| 42 private: |
| 43 BeginSubtreeDisplayItem(DisplayItemClient client, Type type) : DisplayItem(c
lient, type) { } |
| 44 |
| 45 virtual bool isBeginSubtree() const final { return true; } |
| 46 |
| 47 #ifndef NDEBUG |
| 48 virtual const char* name() const override { return "BeginSubtree"; } |
| 49 #endif |
| 50 }; |
| 51 |
| 52 class PLATFORM_EXPORT EndSubtreeDisplayItem : public DisplayItem { |
| 53 WTF_MAKE_FAST_ALLOCATED; |
| 54 public: |
| 55 static PassOwnPtr<EndSubtreeDisplayItem> create(DisplayItemClient client, Ty
pe type) |
| 56 { |
| 57 return adoptPtr(new EndSubtreeDisplayItem(client, type)); |
| 58 } |
| 59 |
| 60 private: |
| 61 EndSubtreeDisplayItem(DisplayItemClient client, Type type) : DisplayItem(cli
ent, type) { } |
| 62 |
| 63 virtual bool isEndSubtree() const final { return true; } |
| 64 |
| 65 #ifndef NDEBUG |
| 66 virtual const char* name() const override { return "EndSubtree"; } |
| 67 #endif |
| 68 }; |
| 69 |
| 70 } // namespace blink |
| 71 |
| 72 #endif // SubtreeDisplayItem_h |
OLD | NEW |