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

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

Issue 1648293003: Fix smooth scroll jump when switching scroll handling between MT and CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: skip irrelevant test on mac Created 4 years, 10 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 | « cc/blink/web_layer_impl.h ('k') | 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 void WebLayerImpl::addMainThreadScrollingReasons( 313 void WebLayerImpl::addMainThreadScrollingReasons(
314 uint32_t main_thread_scrolling_reasons) { 314 uint32_t main_thread_scrolling_reasons) {
315 // WebLayerImpl should only know about non-transient scrolling 315 // WebLayerImpl should only know about non-transient scrolling
316 // reasons. Transient scrolling reasons are computed per hit test. 316 // reasons. Transient scrolling reasons are computed per hit test.
317 DCHECK(main_thread_scrolling_reasons); 317 DCHECK(main_thread_scrolling_reasons);
318 DCHECK(cc::MainThreadScrollingReason::MainThreadCanSetScrollReasons( 318 DCHECK(cc::MainThreadScrollingReason::MainThreadCanSetScrollReasons(
319 main_thread_scrolling_reasons)); 319 main_thread_scrolling_reasons));
320 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons); 320 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons);
321 } 321 }
322 322
323 void WebLayerImpl::clearMainThreadScrollingReasons() { 323 void WebLayerImpl::clearMainThreadScrollingReasons(
324 layer_->ClearMainThreadScrollingReasons(); 324 uint32_t main_thread_scrolling_reasons_to_clear) {
325 layer_->ClearMainThreadScrollingReasons(
326 main_thread_scrolling_reasons_to_clear);
327 }
328
329 uint32_t WebLayerImpl::mainThreadScrollingReasons() {
330 return layer_->main_thread_scrolling_reasons();
325 } 331 }
326 332
327 bool WebLayerImpl::shouldScrollOnMainThread() const { 333 bool WebLayerImpl::shouldScrollOnMainThread() const {
328 return layer_->should_scroll_on_main_thread(); 334 return layer_->should_scroll_on_main_thread();
329 } 335 }
330 336
331 void WebLayerImpl::setNonFastScrollableRegion(const WebVector<WebRect>& rects) { 337 void WebLayerImpl::setNonFastScrollableRegion(const WebVector<WebRect>& rects) {
332 cc::Region region; 338 cc::Region region;
333 for (size_t i = 0; i < rects.size(); ++i) 339 for (size_t i = 0; i < rects.size(); ++i)
334 region.Union(rects[i]); 340 region.Union(rects[i]);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 494
489 Layer* WebLayerImpl::layer() const { 495 Layer* WebLayerImpl::layer() const {
490 return layer_.get(); 496 return layer_.get();
491 } 497 }
492 498
493 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { 499 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) {
494 contents_opaque_is_fixed_ = fixed; 500 contents_opaque_is_fixed_ = fixed;
495 } 501 }
496 502
497 } // namespace cc_blink 503 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/input/main_thread_scrolling_reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698