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

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

Issue 615953005: Move page scale animation from LayerTreeHostImpl to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added CC_EXPORT to PageScaleAnimation 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/input/page_scale_animation.h ('k') | cc/trees/layer_tree_host_impl.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 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 sync_tree->sent_top_controls_delta()); 354 sync_tree->sent_top_controls_delta());
355 sync_tree->set_sent_top_controls_delta(0.f); 355 sync_tree->set_sent_top_controls_delta(0.f);
356 356
357 host_impl->SetUseGpuRasterization(UseGpuRasterization()); 357 host_impl->SetUseGpuRasterization(UseGpuRasterization());
358 RecordGpuRasterizationHistogram(); 358 RecordGpuRasterizationHistogram();
359 359
360 host_impl->SetViewportSize(device_viewport_size_); 360 host_impl->SetViewportSize(device_viewport_size_);
361 host_impl->SetDeviceScaleFactor(device_scale_factor_); 361 host_impl->SetDeviceScaleFactor(device_scale_factor_);
362 host_impl->SetDebugState(debug_state_); 362 host_impl->SetDebugState(debug_state_);
363 if (pending_page_scale_animation_) { 363 if (pending_page_scale_animation_) {
364 host_impl->StartPageScaleAnimation( 364 sync_tree->SetPageScaleAnimation(
365 pending_page_scale_animation_->target_offset, 365 pending_page_scale_animation_->target_offset,
366 pending_page_scale_animation_->use_anchor, 366 pending_page_scale_animation_->use_anchor,
367 pending_page_scale_animation_->scale, 367 pending_page_scale_animation_->scale,
368 pending_page_scale_animation_->duration); 368 pending_page_scale_animation_->duration);
369 pending_page_scale_animation_ = nullptr; 369 pending_page_scale_animation_ = nullptr;
370 } 370 }
371 371
372 if (!ui_resource_request_queue_.empty()) { 372 if (!ui_resource_request_queue_.empty()) {
373 sync_tree->set_ui_resource_request_queue(ui_resource_request_queue_); 373 sync_tree->set_ui_resource_request_queue(ui_resource_request_queue_);
374 ui_resource_request_queue_.clear(); 374 ui_resource_request_queue_.clear();
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 swap_promise_list_.push_back(swap_promise.Pass()); 1334 swap_promise_list_.push_back(swap_promise.Pass());
1335 } 1335 }
1336 1336
1337 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1337 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1338 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1338 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1339 swap_promise_list_[i]->DidNotSwap(reason); 1339 swap_promise_list_[i]->DidNotSwap(reason);
1340 swap_promise_list_.clear(); 1340 swap_promise_list_.clear();
1341 } 1341 }
1342 1342
1343 } // namespace cc 1343 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/page_scale_animation.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698