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 22 matching lines...) Expand all Loading... |
33 const FloatPoint& location, | 33 const FloatPoint& location, |
34 const IntSize& bounds); | 34 const IntSize& bounds); |
35 ~ForeignLayerDisplayItem(); | 35 ~ForeignLayerDisplayItem(); |
36 | 36 |
37 cc::Layer* GetLayer() const { return layer_.get(); } | 37 cc::Layer* GetLayer() const { return layer_.get(); } |
38 const FloatPoint& Location() const { return location_; } | 38 const FloatPoint& Location() const { return location_; } |
39 const IntSize& Bounds() const { return bounds_; } | 39 const IntSize& Bounds() const { return bounds_; } |
40 | 40 |
41 // DisplayItem | 41 // DisplayItem |
42 void Replay(GraphicsContext&) const override; | 42 void Replay(GraphicsContext&) const override; |
43 void AppendToWebDisplayItemList(const IntRect&, | 43 void AppendToWebDisplayItemList(const LayoutSize&, |
44 WebDisplayItemList*) const override; | 44 WebDisplayItemList*) const override; |
45 bool DrawsContent() const override; | 45 bool DrawsContent() const override; |
46 bool Equals(const DisplayItem&) const override; | 46 bool Equals(const DisplayItem&) const override; |
47 #ifndef NDEBUG | 47 #ifndef NDEBUG |
48 void DumpPropertiesAsDebugString(StringBuilder&) const override; | 48 void DumpPropertiesAsDebugString(StringBuilder&) const override; |
49 #endif | 49 #endif |
50 | 50 |
51 private: | 51 private: |
52 scoped_refptr<cc::Layer> layer_; | 52 scoped_refptr<cc::Layer> layer_; |
53 FloatPoint location_; | 53 FloatPoint location_; |
54 IntSize bounds_; | 54 IntSize bounds_; |
55 }; | 55 }; |
56 | 56 |
57 // Records a foreign layer into a GraphicsContext. | 57 // Records a foreign layer into a GraphicsContext. |
58 // Use this where you would use a recorder class. | 58 // Use this where you would use a recorder class. |
59 PLATFORM_EXPORT void RecordForeignLayer(GraphicsContext&, | 59 PLATFORM_EXPORT void RecordForeignLayer(GraphicsContext&, |
60 const DisplayItemClient&, | 60 const DisplayItemClient&, |
61 DisplayItem::Type, | 61 DisplayItem::Type, |
62 WebLayer*, | 62 WebLayer*, |
63 const FloatPoint& location, | 63 const FloatPoint& location, |
64 const IntSize& bounds); | 64 const IntSize& bounds); |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // ForeignLayerDisplayItem_h | 68 #endif // ForeignLayerDisplayItem_h |
OLD | NEW |