| 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 "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
| 8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
| 9 #include "platform/graphics/paint/PaintController.h" | 9 #include "platform/graphics/paint/PaintController.h" |
| 10 #include "public/platform/WebLayer.h" | 10 #include "public/platform/WebLayer.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 { | 59 { |
| 60 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); | 60 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); |
| 61 stringBuilder.append(String::format(", layer: %d", m_layer->id())); | 61 stringBuilder.append(String::format(", layer: %d", m_layer->id())); |
| 62 } | 62 } |
| 63 #endif // NDEBUG | 63 #endif // NDEBUG |
| 64 | 64 |
| 65 void recordForeignLayer(GraphicsContext& context, | 65 void recordForeignLayer(GraphicsContext& context, |
| 66 const DisplayItemClient& client, DisplayItem::Type type, | 66 const DisplayItemClient& client, DisplayItem::Type type, |
| 67 WebLayer* webLayer, const FloatPoint& location, const IntSize& bounds) | 67 WebLayer* webLayer, const FloatPoint& location, const IntSize& bounds) |
| 68 { | 68 { |
| 69 PaintController& paintController = context.paintController(); | 69 PaintController& paintController = context.getPaintController(); |
| 70 if (paintController.displayItemConstructionIsDisabled()) | 70 if (paintController.displayItemConstructionIsDisabled()) |
| 71 return; | 71 return; |
| 72 | 72 |
| 73 paintController.createAndAppend<ForeignLayerDisplayItem>(client, type, webLa
yer->ccLayer(), location, bounds); | 73 paintController.createAndAppend<ForeignLayerDisplayItem>(client, type, webLa
yer->ccLayer(), location, bounds); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |