OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |