| 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/CanvasSurfaceLayerBridge.h" | 5 #include "platform/graphics/CanvasSurfaceLayerBridge.h" |
| 6 | 6 |
| 7 #include "cc/layers/solid_color_layer.h" | 7 #include "cc/layers/solid_color_layer.h" |
| 8 #include "platform/graphics/GraphicsLayer.h" | 8 #include "platform/graphics/GraphicsLayer.h" |
| 9 #include "public/platform/Platform.h" | 9 #include "public/platform/Platform.h" |
| 10 #include "public/platform/WebCompositorSupport.h" | 10 #include "public/platform/WebCompositorSupport.h" |
| 11 #include "public/platform/WebLayer.h" | 11 #include "public/platform/WebLayer.h" |
| 12 #include "wtf/PtrUtil.h" | |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge() | 15 CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge() |
| 17 { | 16 { |
| 18 m_solidColorLayer = cc::SolidColorLayer::Create(); | 17 m_solidColorLayer = cc::SolidColorLayer::Create(); |
| 19 m_solidColorLayer->SetBackgroundColor(SK_ColorBLUE); | 18 m_solidColorLayer->SetBackgroundColor(SK_ColorBLUE); |
| 20 m_webLayer = wrapUnique(Platform::current()->compositorSupport()->createLaye
rFromCCLayer(m_solidColorLayer.get())); | 19 m_webLayer = adoptPtr(Platform::current()->compositorSupport()->createLayerF
romCCLayer(m_solidColorLayer.get())); |
| 21 GraphicsLayer::registerContentsLayer(m_webLayer.get()); | 20 GraphicsLayer::registerContentsLayer(m_webLayer.get()); |
| 22 } | 21 } |
| 23 | 22 |
| 24 CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge() | 23 CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge() |
| 25 { | 24 { |
| 26 } | 25 } |
| 27 | 26 |
| 28 } | 27 } |
| OLD | NEW |