OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ForeignLayerDisplayItem_h | 5 #ifndef ForeignLayerDisplayItem_h |
6 #define ForeignLayerDisplayItem_h | 6 #define ForeignLayerDisplayItem_h |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
10 #include "platform/RuntimeEnabledFeatures.h" | 10 #include "platform/RuntimeEnabledFeatures.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 ~ForeignLayerDisplayItem(); | 35 ~ForeignLayerDisplayItem(); |
36 | 36 |
37 cc::Layer* layer() const { return m_layer.get(); } | 37 cc::Layer* layer() const { return m_layer.get(); } |
38 const FloatPoint& location() const { return m_location; } | 38 const FloatPoint& location() const { return m_location; } |
39 const IntSize& bounds() const { return m_bounds; } | 39 const IntSize& bounds() const { return m_bounds; } |
40 | 40 |
41 // DisplayItem | 41 // DisplayItem |
42 void replay(GraphicsContext&) const override; | 42 void replay(GraphicsContext&) const override; |
43 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o
verride; | 43 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o
verride; |
44 bool drawsContent() const override; | 44 bool drawsContent() const override; |
| 45 #if ENABLE(ASSERT) |
45 bool equals(const DisplayItem&) const override; | 46 bool equals(const DisplayItem&) const override; |
| 47 #endif |
46 #ifndef NDEBUG | 48 #ifndef NDEBUG |
47 void dumpPropertiesAsDebugString(StringBuilder&) const override; | 49 void dumpPropertiesAsDebugString(StringBuilder&) const override; |
48 #endif | 50 #endif |
49 | 51 |
50 private: | 52 private: |
51 scoped_refptr<cc::Layer> m_layer; | 53 scoped_refptr<cc::Layer> m_layer; |
52 FloatPoint m_location; | 54 FloatPoint m_location; |
53 IntSize m_bounds; | 55 IntSize m_bounds; |
54 }; | 56 }; |
55 | 57 |
56 // Records a foreign layer into a GraphicsContext. | 58 // Records a foreign layer into a GraphicsContext. |
57 // Use this where you would use a recorder class. | 59 // Use this where you would use a recorder class. |
58 PLATFORM_EXPORT void recordForeignLayer( | 60 PLATFORM_EXPORT void recordForeignLayer( |
59 GraphicsContext&, const DisplayItemClient&, DisplayItem::Type, | 61 GraphicsContext&, const DisplayItemClient&, DisplayItem::Type, |
60 WebLayer*, const FloatPoint& location, const IntSize& bounds); | 62 WebLayer*, const FloatPoint& location, const IntSize& bounds); |
61 | 63 |
62 } // namespace blink | 64 } // namespace blink |
63 | 65 |
64 #endif // ForeignLayerDisplayItem_h | 66 #endif // ForeignLayerDisplayItem_h |
OLD | NEW |