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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 642113004: cc: Damage layer on delegated scroll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DidScroll Created 6 years, 2 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/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2687 } 2687 }
2688 2688
2689 void LayerTreeHostImpl::SetRootLayerScrollOffsetDelegate( 2689 void LayerTreeHostImpl::SetRootLayerScrollOffsetDelegate(
2690 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) { 2690 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) {
2691 root_layer_scroll_offset_delegate_ = root_layer_scroll_offset_delegate; 2691 root_layer_scroll_offset_delegate_ = root_layer_scroll_offset_delegate;
2692 active_tree_->SetRootLayerScrollOffsetDelegate( 2692 active_tree_->SetRootLayerScrollOffsetDelegate(
2693 root_layer_scroll_offset_delegate_); 2693 root_layer_scroll_offset_delegate_);
2694 } 2694 }
2695 2695
2696 void LayerTreeHostImpl::OnRootLayerDelegatedScrollOffsetChanged() { 2696 void LayerTreeHostImpl::OnRootLayerDelegatedScrollOffsetChanged() {
2697 DCHECK(root_layer_scroll_offset_delegate_ != NULL); 2697 DCHECK(root_layer_scroll_offset_delegate_);
2698 client_->SetNeedsCommitOnImplThread(); 2698 client_->SetNeedsCommitOnImplThread();
2699 SetNeedsRedraw();
2700 active_tree_->OnRootLayerDelegatedScrollOffsetChanged();
2699 active_tree_->set_needs_update_draw_properties(); 2701 active_tree_->set_needs_update_draw_properties();
2700 } 2702 }
2701 2703
2702 void LayerTreeHostImpl::ClearCurrentlyScrollingLayer() { 2704 void LayerTreeHostImpl::ClearCurrentlyScrollingLayer() {
2703 active_tree_->ClearCurrentlyScrollingLayer(); 2705 active_tree_->ClearCurrentlyScrollingLayer();
2704 did_lock_scrolling_layer_ = false; 2706 did_lock_scrolling_layer_ = false;
2705 scroll_affects_scroll_handler_ = false; 2707 scroll_affects_scroll_handler_ = false;
2706 accumulated_root_overscroll_ = gfx::Vector2dF(); 2708 accumulated_root_overscroll_ = gfx::Vector2dF();
2707 } 2709 }
2708 2710
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
3383 } 3385 }
3384 3386
3385 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3387 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3386 std::vector<PictureLayerImpl*>::iterator it = 3388 std::vector<PictureLayerImpl*>::iterator it =
3387 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3389 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3388 DCHECK(it != picture_layers_.end()); 3390 DCHECK(it != picture_layers_.end());
3389 picture_layers_.erase(it); 3391 picture_layers_.erase(it);
3390 } 3392 }
3391 3393
3392 } // namespace cc 3394 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698