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) | |
46 bool equals(const DisplayItem&) const override; | 45 bool equals(const DisplayItem&) const override; |
47 #endif | |
48 #ifndef NDEBUG | 46 #ifndef NDEBUG |
49 void dumpPropertiesAsDebugString(StringBuilder&) const override; | 47 void dumpPropertiesAsDebugString(StringBuilder&) const override; |
50 #endif | 48 #endif |
51 | 49 |
52 private: | 50 private: |
53 scoped_refptr<cc::Layer> m_layer; | 51 scoped_refptr<cc::Layer> m_layer; |
54 FloatPoint m_location; | 52 FloatPoint m_location; |
55 IntSize m_bounds; | 53 IntSize m_bounds; |
56 }; | 54 }; |
57 | 55 |
58 // Records a foreign layer into a GraphicsContext. | 56 // Records a foreign layer into a GraphicsContext. |
59 // Use this where you would use a recorder class. | 57 // Use this where you would use a recorder class. |
60 PLATFORM_EXPORT void recordForeignLayer( | 58 PLATFORM_EXPORT void recordForeignLayer( |
61 GraphicsContext&, const DisplayItemClient&, DisplayItem::Type, | 59 GraphicsContext&, const DisplayItemClient&, DisplayItem::Type, |
62 WebLayer*, const FloatPoint& location, const IntSize& bounds); | 60 WebLayer*, const FloatPoint& location, const IntSize& bounds); |
63 | 61 |
64 } // namespace blink | 62 } // namespace blink |
65 | 63 |
66 #endif // ForeignLayerDisplayItem_h | 64 #endif // ForeignLayerDisplayItem_h |
OLD | NEW |