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

Side by Side Diff: cc/layers/layer.cc

Issue 210543002: Removed pinch viewport scroll offset distribution (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 void Layer::RemoveClipChild(Layer* child) { 667 void Layer::RemoveClipChild(Layer* child) {
668 clip_children_->erase(child); 668 clip_children_->erase(child);
669 if (clip_children_->empty()) 669 if (clip_children_->empty())
670 clip_children_.reset(); 670 clip_children_.reset();
671 SetNeedsCommit(); 671 SetNeedsCommit();
672 } 672 }
673 673
674 void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) { 674 void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
675 DCHECK(IsPropertyChangeAllowed()); 675 DCHECK(IsPropertyChangeAllowed());
676 676
677 if (layer_tree_host()) { 677 // TODO(bokan): Virtual viewport pinch doesn't need manual updates of main
678 // frame and pinch viewport layers. Remove once old-style pinch is no longer
679 // supported.
680 if (layer_tree_host() &&
681 !layer_tree_host()->settings().use_pinch_virtual_viewport) {
678 scroll_offset = layer_tree_host()->DistributeScrollOffsetToViewports( 682 scroll_offset = layer_tree_host()->DistributeScrollOffsetToViewports(
aelias_OOO_until_Jul13 2014/03/25 00:09:23 It looks like this method just does "return offset
679 scroll_offset, this); 683 scroll_offset, this);
680 } 684 }
681 685
682 if (scroll_offset_ == scroll_offset) 686 if (scroll_offset_ == scroll_offset)
683 return; 687 return;
684 scroll_offset_ = scroll_offset; 688 scroll_offset_ = scroll_offset;
685 SetNeedsCommit(); 689 SetNeedsCommit();
686 } 690 }
687 691
688 void Layer::SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset) { 692 void Layer::SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset) {
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 if (clip_parent_) 1223 if (clip_parent_)
1220 clip_parent_->RemoveClipChild(this); 1224 clip_parent_->RemoveClipChild(this);
1221 1225
1222 clip_parent_ = NULL; 1226 clip_parent_ = NULL;
1223 } 1227 }
1224 1228
1225 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { 1229 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) {
1226 benchmark->RunOnLayer(this); 1230 benchmark->RunOnLayer(this);
1227 } 1231 }
1228 } // namespace cc 1232 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698