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

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

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Fixed all existing tests! New tests pending... Created 7 years, 5 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
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_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void LayerTreeImpl::SetPageScaleDelta(float delta) { 179 void LayerTreeImpl::SetPageScaleDelta(float delta) {
180 // Clamp to the current min/max limits. 180 // Clamp to the current min/max limits.
181 float total = page_scale_factor_ * delta; 181 float total = page_scale_factor_ * delta;
182 if (min_page_scale_factor_ && total < min_page_scale_factor_) 182 if (min_page_scale_factor_ && total < min_page_scale_factor_)
183 delta = min_page_scale_factor_ / page_scale_factor_; 183 delta = min_page_scale_factor_ / page_scale_factor_;
184 else if (max_page_scale_factor_ && total > max_page_scale_factor_) 184 else if (max_page_scale_factor_ && total > max_page_scale_factor_)
185 delta = max_page_scale_factor_ / page_scale_factor_; 185 delta = max_page_scale_factor_ / page_scale_factor_;
186 186
187 if (delta == page_scale_delta_) 187 if (delta == page_scale_delta_)
188 return; 188 return;
189
190 page_scale_delta_ = delta; 189 page_scale_delta_ = delta;
191 190
192 if (IsActiveTree()) { 191 if (IsActiveTree()) {
193 LayerTreeImpl* pending_tree = layer_tree_host_impl_->pending_tree(); 192 LayerTreeImpl* pending_tree = layer_tree_host_impl_->pending_tree();
194 if (pending_tree) { 193 if (pending_tree) {
195 DCHECK_EQ(1, pending_tree->sent_page_scale_delta()); 194 DCHECK_EQ(1, pending_tree->sent_page_scale_delta());
196 pending_tree->SetPageScaleDelta( 195 pending_tree->SetPageScaleDelta(
197 page_scale_delta_ / sent_page_scale_delta_); 196 page_scale_delta_ / sent_page_scale_delta_);
198 } 197 }
199 } 198 }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() 587 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest()
589 const { 588 const {
590 // Only the active tree needs to know about layers with copy requests, as 589 // Only the active tree needs to know about layers with copy requests, as
591 // they are aborted if not serviced during draw. 590 // they are aborted if not serviced during draw.
592 DCHECK(IsActiveTree()); 591 DCHECK(IsActiveTree());
593 592
594 return layers_with_copy_output_request_; 593 return layers_with_copy_output_request_;
595 } 594 }
596 595
597 } // namespace cc 596 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698