OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/blink/web_layer_impl.h" | 5 #include "cc/blink/web_layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 void WebLayerImpl::addMainThreadScrollingReasons( | 323 void WebLayerImpl::addMainThreadScrollingReasons( |
324 uint32_t main_thread_scrolling_reasons) { | 324 uint32_t main_thread_scrolling_reasons) { |
325 // WebLayerImpl should only know about non-transient scrolling | 325 // WebLayerImpl should only know about non-transient scrolling |
326 // reasons. Transient scrolling reasons are computed per hit test. | 326 // reasons. Transient scrolling reasons are computed per hit test. |
327 DCHECK(main_thread_scrolling_reasons); | 327 DCHECK(main_thread_scrolling_reasons); |
328 DCHECK(cc::MainThreadScrollingReason::MainThreadCanSetScrollReasons( | 328 DCHECK(cc::MainThreadScrollingReason::MainThreadCanSetScrollReasons( |
329 main_thread_scrolling_reasons)); | 329 main_thread_scrolling_reasons)); |
330 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons); | 330 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons); |
331 } | 331 } |
332 | 332 |
| 333 void WebLayerImpl::clearMainThreadScrollingReasons( |
| 334 uint32_t main_thread_scrolling_reasons_to_clear) { |
| 335 layer_->ClearMainThreadScrollingReasons( |
| 336 main_thread_scrolling_reasons_to_clear); |
| 337 } |
| 338 |
333 void WebLayerImpl::clearMainThreadScrollingReasons() { | 339 void WebLayerImpl::clearMainThreadScrollingReasons() { |
334 layer_->ClearMainThreadScrollingReasons(); | 340 layer_->ClearMainThreadScrollingReasons(); |
335 } | 341 } |
336 | 342 |
337 bool WebLayerImpl::shouldScrollOnMainThread() const { | 343 bool WebLayerImpl::shouldScrollOnMainThread() const { |
338 return layer_->should_scroll_on_main_thread(); | 344 return layer_->should_scroll_on_main_thread(); |
339 } | 345 } |
340 | 346 |
341 void WebLayerImpl::setNonFastScrollableRegion(const WebVector<WebRect>& rects) { | 347 void WebLayerImpl::setNonFastScrollableRegion(const WebVector<WebRect>& rects) { |
342 cc::Region region; | 348 cc::Region region; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 504 |
499 Layer* WebLayerImpl::layer() const { | 505 Layer* WebLayerImpl::layer() const { |
500 return layer_.get(); | 506 return layer_.get(); |
501 } | 507 } |
502 | 508 |
503 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { | 509 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { |
504 contents_opaque_is_fixed_ = fixed; | 510 contents_opaque_is_fixed_ = fixed; |
505 } | 511 } |
506 | 512 |
507 } // namespace cc_blink | 513 } // namespace cc_blink |
OLD | NEW |