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

Unified Diff: ui/compositor/layer_animation_element.cc

Issue 271533014: Make ui::Layer use the cc:LayerTreeHost scale factor directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove texture scaling fix Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/layer_owner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element.cc
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index a8f628a7ddb21ec9ba2d603db9fb7ba0cf175c68..c25e4a1dc9647ad3de449f74c24353fe89351582 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -449,11 +449,6 @@ class ThreadedTransformTransition : public ThreadedLayerAnimationElement {
protected:
virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
start_ = delegate->GetTransformForAnimation();
- float device_scale_factor = delegate->GetDeviceScaleFactor();
- cc_start_ = Layer::ConvertTransformToCCTransform(start_,
- device_scale_factor);
- cc_target_ = Layer::ConvertTransformToCCTransform(target_,
- device_scale_factor);
}
virtual void OnAbort(LayerAnimationDelegate* delegate) OVERRIDE {
@@ -473,8 +468,8 @@ class ThreadedTransformTransition : public ThreadedLayerAnimationElement {
virtual scoped_ptr<cc::Animation> CreateCCAnimation() OVERRIDE {
scoped_ptr<cc::AnimationCurve> animation_curve(
new TransformAnimationCurveAdapter(tween_type(),
- cc_start_,
- cc_target_,
+ start_,
+ target_,
duration()));
scoped_ptr<cc::Animation> animation(
cc::Animation::Create(animation_curve.Pass(),
@@ -490,9 +485,7 @@ class ThreadedTransformTransition : public ThreadedLayerAnimationElement {
private:
gfx::Transform start_;
- gfx::Transform cc_start_;
const gfx::Transform target_;
- gfx::Transform cc_target_;
DISALLOW_COPY_AND_ASSIGN(ThreadedTransformTransition);
};
@@ -529,22 +522,13 @@ class InverseTransformTransition : public ThreadedLayerAnimationElement {
set_tween_type(uninverted_transition_->tween_type());
- float device_scale_factor = delegate->GetDeviceScaleFactor();
- const gfx::Transform cc_base_start = Layer::ConvertTransformToCCTransform(
- base_transform_,
- device_scale_factor);
- const gfx::Transform cc_base_target = Layer::ConvertTransformToCCTransform(
- base_target_,
- device_scale_factor);
TransformAnimationCurveAdapter base_curve(tween_type(),
- cc_base_start,
- cc_base_target,
+ base_transform_,
+ base_target_,
duration());
- const gfx::Transform cc_start = Layer::ConvertTransformToCCTransform(
- start, device_scale_factor);
animation_curve_.reset(new InverseTransformCurveAdapter(
- base_curve, cc_start, duration()));
+ base_curve, start, duration()));
computed_target_transform_ = ComputeWithBaseTransform(effective_start_,
base_target_);
}
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/layer_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698