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

Side by Side Diff: cc/blimp/layer_tree_host_remote.cc

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month 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/blink/web_layer_impl.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/blimp/layer_tree_host_remote.h" 5 #include "cc/blimp/layer_tree_host_remote.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/animation/animation_host.h" 10 #include "cc/animation/animation_host.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 Layer* layer = layer_tree_->LayerById(client_scroll.first); 430 Layer* layer = layer_tree_->LayerById(client_scroll.first);
431 const gfx::ScrollOffset& scroll_offset = client_scroll.second; 431 const gfx::ScrollOffset& scroll_offset = client_scroll.second;
432 432
433 // Note the inner viewport scroll delta to report separately. 433 // Note the inner viewport scroll delta to report separately.
434 if (layer == inner_viewport_scroll_layer) { 434 if (layer == inner_viewport_scroll_layer) {
435 inner_viewport_scroll_delta = 435 inner_viewport_scroll_delta =
436 scroll_offset.DeltaFrom(layer->scroll_offset()); 436 scroll_offset.DeltaFrom(layer->scroll_offset());
437 } 437 }
438 438
439 if (layer) 439 if (layer)
440 layer->SetScrollOffsetFromImplSide(scroll_offset); 440 layer->SetScrollOffsetFromImplSide(scroll_offset, nullptr);
441 else 441 else
442 layer_sync_successful = false; 442 layer_sync_successful = false;
443 } 443 }
444 444
445 float page_scale_delta = 1.0f; 445 float page_scale_delta = 1.0f;
446 if (client_page_scale != layer_tree_->page_scale_factor()) { 446 if (client_page_scale != layer_tree_->page_scale_factor()) {
447 page_scale_delta = client_page_scale / layer_tree_->page_scale_factor(); 447 page_scale_delta = client_page_scale / layer_tree_->page_scale_factor();
448 layer_tree_->SetPageScaleFromImplSide(client_page_scale); 448 layer_tree_->SetPageScaleFromImplSide(client_page_scale);
449 } 449 }
450 450
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 layer_tree_host_proto->mutable_layer_updates(), inputs_only); 492 layer_tree_host_proto->mutable_layer_updates(), inputs_only);
493 layer_tree_->LayersThatShouldPushProperties().clear(); 493 layer_tree_->LayersThatShouldPushProperties().clear();
494 494
495 std::vector<PictureData> pictures = 495 std::vector<PictureData> pictures =
496 engine_picture_cache_->CalculateCacheUpdateAndFlush(); 496 engine_picture_cache_->CalculateCacheUpdateAndFlush();
497 proto::PictureDataVectorToSkPicturesProto( 497 proto::PictureDataVectorToSkPicturesProto(
498 pictures, layer_tree_host_proto->mutable_pictures()); 498 pictures, layer_tree_host_proto->mutable_pictures());
499 } 499 }
500 500
501 } // namespace cc 501 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/blink/web_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698