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

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

Issue 11308354: Use SkSafeRef when claiming a ref on the SkImageFilter at the WebKit API boundary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « no previous file | 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 "web_layer_impl.h" 5 #include "web_layer_impl.h"
6 6
7 #include "SkMatrix44.h" 7 #include "SkMatrix44.h"
8 #ifdef LOG 8 #ifdef LOG
9 #undef LOG 9 #undef LOG
10 #endif 10 #endif
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 m_layer->setFilters(filters); 234 m_layer->setFilters(filters);
235 } 235 }
236 236
237 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) 237 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters)
238 { 238 {
239 m_layer->setBackgroundFilters(filters); 239 m_layer->setBackgroundFilters(filters);
240 } 240 }
241 241
242 void WebLayerImpl::setFilter(SkImageFilter* filter) 242 void WebLayerImpl::setFilter(SkImageFilter* filter)
243 { 243 {
244 filter->ref(); // Claim a reference for the compositor. 244 SkSafeRef(filter); // Claim a reference for the compositor.
245 m_layer->setFilter(skia::AdoptRef(filter)); 245 m_layer->setFilter(skia::AdoptRef(filter));
246 } 246 }
247 247
248 void WebLayerImpl::setDebugName(WebString name) 248 void WebLayerImpl::setDebugName(WebString name)
249 { 249 {
250 m_layer->setDebugName(UTF16ToASCII(string16(name.data(), name.length()))); 250 m_layer->setDebugName(UTF16ToASCII(string16(name.data(), name.length())));
251 } 251 }
252 252
253 void WebLayerImpl::setAnimationDelegate(WebAnimationDelegate* delegate) 253 void WebLayerImpl::setAnimationDelegate(WebAnimationDelegate* delegate)
254 { 254 {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 { 422 {
423 m_layer->setLayerScrollClient(scrollClient); 423 m_layer->setLayerScrollClient(scrollClient);
424 } 424 }
425 425
426 Layer* WebLayerImpl::layer() const 426 Layer* WebLayerImpl::layer() const
427 { 427 {
428 return m_layer.get(); 428 return m_layer.get();
429 } 429 }
430 430
431 } // namespace WebKit 431 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698