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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 692213002: Create PageScaleAnimation after ImplTree is activated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 808bf21a767fc772ecc909c88242c3e27f93584f..19a3e863921079c2f3d385ba5cd76d9f4b4de910 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -23,6 +23,7 @@
#include "cc/debug/devtools_instrumentation.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/input/layer_selection_bound.h"
+#include "cc/input/page_scale_animation.h"
#include "cc/input/top_controls_manager.h"
#include "cc/layers/heads_up_display_layer.h"
#include "cc/layers/heads_up_display_layer_impl.h"
@@ -381,12 +382,8 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
host_impl->SetDeviceScaleFactor(device_scale_factor_);
host_impl->SetDebugState(debug_state_);
if (pending_page_scale_animation_) {
- sync_tree->SetPageScaleAnimation(
- pending_page_scale_animation_->target_offset,
- pending_page_scale_animation_->use_anchor,
- pending_page_scale_animation_->scale,
- pending_page_scale_animation_->duration);
- pending_page_scale_animation_ = nullptr;
+ sync_tree->SetPendingPageScaleAnimation(
+ pending_page_scale_animation_.Pass());
}
if (!ui_resource_request_queue_.empty()) {
@@ -724,11 +721,12 @@ void LayerTreeHost::StartPageScaleAnimation(const gfx::Vector2d& target_offset,
bool use_anchor,
float scale,
base::TimeDelta duration) {
- pending_page_scale_animation_.reset(new PendingPageScaleAnimation);
- pending_page_scale_animation_->target_offset = target_offset;
- pending_page_scale_animation_->use_anchor = use_anchor;
- pending_page_scale_animation_->scale = scale;
- pending_page_scale_animation_->duration = duration;
+ pending_page_scale_animation_.reset(
+ new PendingPageScaleAnimation(
+ target_offset,
+ use_anchor,
+ scale,
+ duration));
SetNeedsCommit();
}
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698