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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 1640373002: Fix broken MainThreadScrollingReason DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | cc/input/main_thread_scrolling_reason.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/input/main_thread_scrolling_reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698