Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698