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 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" | 5 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" |
6 | 6 |
| 7 #include <utility> |
7 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
8 #include "platform/graphics/GraphicsContext.h" | 9 #include "platform/graphics/GraphicsContext.h" |
9 #include "platform/graphics/paint/PaintController.h" | 10 #include "platform/graphics/paint/PaintController.h" |
10 #include "public/platform/WebLayer.h" | 11 #include "public/platform/WebLayer.h" |
11 #include "wtf/Assertions.h" | 12 #include "wtf/Assertions.h" |
12 #include <utility> | |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 ForeignLayerDisplayItem::ForeignLayerDisplayItem( | 16 ForeignLayerDisplayItem::ForeignLayerDisplayItem( |
17 const DisplayItemClient& client, | 17 const DisplayItemClient& client, |
18 Type type, | 18 Type type, |
19 scoped_refptr<cc::Layer> layer, | 19 scoped_refptr<cc::Layer> layer, |
20 const FloatPoint& location, | 20 const FloatPoint& location, |
21 const IntSize& bounds) | 21 const IntSize& bounds) |
22 : DisplayItem(client, type, sizeof(*this)), | 22 : DisplayItem(client, type, sizeof(*this)), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 const IntSize& bounds) { | 65 const IntSize& bounds) { |
66 PaintController& paintController = context.getPaintController(); | 66 PaintController& paintController = context.getPaintController(); |
67 if (paintController.displayItemConstructionIsDisabled()) | 67 if (paintController.displayItemConstructionIsDisabled()) |
68 return; | 68 return; |
69 | 69 |
70 paintController.createAndAppend<ForeignLayerDisplayItem>( | 70 paintController.createAndAppend<ForeignLayerDisplayItem>( |
71 client, type, webLayer->ccLayer(), location, bounds); | 71 client, type, webLayer->ccLayer(), location, bounds); |
72 } | 72 } |
73 | 73 |
74 } // namespace blink | 74 } // namespace blink |
OLD | NEW |