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

Unified Diff: ui/compositor/layer.cc

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Should pass trybots this time Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_animation_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 950c3097e6395f341b771f6d990196f1be73b062..0ab406e4fc6946fcb36c4ed16bf158d26feefd80 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -186,11 +186,11 @@ LayerAnimator* Layer::GetAnimator() {
return animator_.get();
}
-void Layer::SetTransform(const ui::Transform& transform) {
+void Layer::SetTransform(const gfx::Transform& transform) {
GetAnimator()->SetTransform(transform);
}
-Transform Layer::GetTargetTransform() const {
+gfx::Transform Layer::GetTargetTransform() const {
if (animator_.get() && animator_->IsAnimatingProperty(
LayerAnimationElement::TRANSFORM)) {
return animator_->GetTargetTransform();
@@ -560,7 +560,7 @@ void Layer::StackRelativeTo(Layer* child, Layer* other, bool above) {
bool Layer::ConvertPointForAncestor(const Layer* ancestor,
gfx::Point* point) const {
- ui::Transform transform;
+ gfx::Transform transform;
bool result = GetTransformRelativeTo(ancestor, &transform);
gfx::Point3f p(*point);
transform.TransformPoint(p);
@@ -570,7 +570,7 @@ bool Layer::ConvertPointForAncestor(const Layer* ancestor,
bool Layer::ConvertPointFromAncestor(const Layer* ancestor,
gfx::Point* point) const {
- ui::Transform transform;
+ gfx::Transform transform;
bool result = GetTransformRelativeTo(ancestor, &transform);
gfx::Point3f p(*point);
transform.TransformPointReverse(p);
@@ -579,7 +579,7 @@ bool Layer::ConvertPointFromAncestor(const Layer* ancestor,
}
bool Layer::GetTransformRelativeTo(const Layer* ancestor,
- ui::Transform* transform) const {
+ gfx::Transform* transform) const {
const Layer* p = this;
for (; p && p != ancestor; p = p->parent()) {
if (p->transform().HasChange())
@@ -616,7 +616,7 @@ void Layer::SetBoundsImmediately(const gfx::Rect& bounds) {
}
}
-void Layer::SetTransformImmediately(const ui::Transform& transform) {
+void Layer::SetTransformImmediately(const gfx::Transform& transform) {
transform_ = transform;
RecomputeTransform();
@@ -663,7 +663,7 @@ void Layer::SetBoundsFromAnimation(const gfx::Rect& bounds) {
SetBoundsImmediately(bounds);
}
-void Layer::SetTransformFromAnimation(const Transform& transform) {
+void Layer::SetTransformFromAnimation(const gfx::Transform& transform) {
SetTransformImmediately(transform);
}
@@ -695,7 +695,7 @@ const gfx::Rect& Layer::GetBoundsForAnimation() const {
return bounds();
}
-const Transform& Layer::GetTransformForAnimation() const {
+const gfx::Transform& Layer::GetTransformForAnimation() const {
return transform();
}
@@ -742,12 +742,12 @@ void Layer::CreateWebLayer() {
}
void Layer::RecomputeTransform() {
- ui::Transform scale_translate;
+ gfx::Transform scale_translate;
scale_translate.matrix().set3x3(device_scale_factor_, 0, 0,
0, device_scale_factor_, 0,
0, 0, 1);
// Start with the inverse matrix of above.
- Transform transform;
+ gfx::Transform transform;
transform.matrix().set3x3(1.0f / device_scale_factor_, 0, 0,
0, 1.0f / device_scale_factor_, 0,
0, 0, 1);
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698