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

Side by Side Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 15004024: Only use skia::RefPtr for refcounting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment changes, SharePtr Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "webkit/renderer/compositor_bindings/web_layer_impl.h" 5 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 void WebLayerImpl::setFilters(const WebFilterOperations& filters) { 156 void WebLayerImpl::setFilters(const WebFilterOperations& filters) {
157 layer_->SetFilters(filters); 157 layer_->SetFilters(filters);
158 } 158 }
159 159
160 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { 160 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) {
161 layer_->SetBackgroundFilters(filters); 161 layer_->SetBackgroundFilters(filters);
162 } 162 }
163 163
164 void WebLayerImpl::setFilter(SkImageFilter* filter) { 164 void WebLayerImpl::setFilter(SkImageFilter* filter) {
165 SkSafeRef(filter); // Claim a reference for the compositor. 165 layer_->SetFilter(skia::SharePtr(filter));
166 layer_->SetFilter(skia::AdoptRef(filter));
167 } 166 }
168 167
169 void WebLayerImpl::setDebugName(WebKit::WebString name) { 168 void WebLayerImpl::setDebugName(WebKit::WebString name) {
170 layer_->SetDebugName( 169 layer_->SetDebugName(
171 UTF16ToASCII(base::string16(name.data(), name.length()))); 170 UTF16ToASCII(base::string16(name.data(), name.length())));
172 } 171 }
173 172
174 void WebLayerImpl::setAnimationDelegate( 173 void WebLayerImpl::setAnimationDelegate(
175 WebKit::WebAnimationDelegate* delegate) { 174 WebKit::WebAnimationDelegate* delegate) {
176 layer_->set_layer_animation_delegate(delegate); 175 layer_->set_layer_animation_delegate(delegate);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void WebLayerImpl::setScrollClient( 342 void WebLayerImpl::setScrollClient(
344 WebKit::WebLayerScrollClient* scroll_client) { 343 WebKit::WebLayerScrollClient* scroll_client) {
345 layer_->set_layer_scroll_client(scroll_client); 344 layer_->set_layer_scroll_client(scroll_client);
346 } 345 }
347 346
348 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } 347 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); }
349 348
350 Layer* WebLayerImpl::layer() const { return layer_.get(); } 349 Layer* WebLayerImpl::layer() const { return layer_.get(); }
351 350
352 } // namespace WebKit 351 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698