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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 } | 337 } |
338 | 338 |
339 void WebLayerImpl::addMainThreadScrollingReasons( | 339 void WebLayerImpl::addMainThreadScrollingReasons( |
340 uint32_t main_thread_scrolling_reasons) { | 340 uint32_t main_thread_scrolling_reasons) { |
341 DCHECK(main_thread_scrolling_reasons); | 341 DCHECK(main_thread_scrolling_reasons); |
342 // WebLayerImpl should only know about non-transient scrolling | 342 // WebLayerImpl should only know about non-transient scrolling |
343 // reasons. Transient scrolling reasons are computed per hit test. | 343 // reasons. Transient scrolling reasons are computed per hit test. |
344 // TODO(tdresser): This is comparing less than a bit flag but that's not valid | 344 // TODO(tdresser): This is comparing less than a bit flag but that's not valid |
345 // if there is more than one reason given in |main_thread_scrolling_reasons|. | 345 // if there is more than one reason given in |main_thread_scrolling_reasons|. |
346 DCHECK_LE(main_thread_scrolling_reasons, | 346 DCHECK_LE(main_thread_scrolling_reasons, |
347 cc::MainThreadScrollingReason::kMaxNonTransientScrollingReason); | 347 cc::MainThreadScrollingReason::kMaxNonTransientScrollingReasons); |
348 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons); | 348 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons); |
349 } | 349 } |
350 | 350 |
351 void WebLayerImpl::clearMainThreadScrollingReasons() { | 351 void WebLayerImpl::clearMainThreadScrollingReasons() { |
352 layer_->ClearMainThreadScrollingReasons(); | 352 layer_->ClearMainThreadScrollingReasons(); |
353 } | 353 } |
354 | 354 |
355 bool WebLayerImpl::shouldScrollOnMainThread() const { | 355 bool WebLayerImpl::shouldScrollOnMainThread() const { |
356 return layer_->should_scroll_on_main_thread(); | 356 return layer_->should_scroll_on_main_thread(); |
357 } | 357 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 | 542 |
543 Layer* WebLayerImpl::layer() const { | 543 Layer* WebLayerImpl::layer() const { |
544 return layer_.get(); | 544 return layer_.get(); |
545 } | 545 } |
546 | 546 |
547 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { | 547 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { |
548 contents_opaque_is_fixed_ = fixed; | 548 contents_opaque_is_fixed_ = fixed; |
549 } | 549 } |
550 | 550 |
551 } // namespace cc_blink | 551 } // namespace cc_blink |
OLD | NEW |