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

Unified Diff: ui/views/view.cc

Issue 11145005: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hopefully should work 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/views/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 5f81c5ff9fb0edbe32e21b7060ef569c1e856482..7fc0fe6f181e0ff51770da68ecce8eb757bfd1ee 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -325,7 +325,7 @@ gfx::Rect View::GetVisibleBounds() const {
gfx::Rect vis_bounds(GetLocalBounds());
gfx::Rect ancestor_bounds;
const View* view = this;
- ui::Transform transform;
+ gfx::Transform transform;
while (view != NULL && !vis_bounds.IsEmpty()) {
transform.ConcatTransform(view->GetTransform());
@@ -426,12 +426,12 @@ void View::OnEnabledChanged() {
// Transformations -------------------------------------------------------------
-const ui::Transform& View::GetTransform() const {
- static const ui::Transform* no_op = new ui::Transform;
+const gfx::Transform& View::GetTransform() const {
+ static const gfx::Transform* no_op = new gfx::Transform;
return layer() ? layer()->transform() : *no_op;
}
-void View::SetTransform(const ui::Transform& transform) {
+void View::SetTransform(const gfx::Transform& transform) {
if (!transform.HasChange()) {
if (layer()) {
layer()->SetTransform(transform);
@@ -1765,7 +1765,7 @@ void View::SetLayerBounds(const gfx::Rect& bounds) {
// Transformations -------------------------------------------------------------
bool View::GetTransformRelativeTo(const View* ancestor,
- ui::Transform* transform) const {
+ gfx::Transform* transform) const {
const View* p = this;
while (p && p != ancestor) {
@@ -1783,7 +1783,7 @@ bool View::GetTransformRelativeTo(const View* ancestor,
bool View::ConvertPointForAncestor(const View* ancestor,
gfx::Point* point) const {
- ui::Transform trans;
+ gfx::Transform trans;
// TODO(sad): Have some way of caching the transformation results.
bool result = GetTransformRelativeTo(ancestor, &trans);
gfx::Point3f p(*point);
@@ -1794,7 +1794,7 @@ bool View::ConvertPointForAncestor(const View* ancestor,
bool View::ConvertPointFromAncestor(const View* ancestor,
gfx::Point* point) const {
- ui::Transform trans;
+ gfx::Transform trans;
bool result = GetTransformRelativeTo(ancestor, &trans);
gfx::Point3f p(*point);
trans.TransformPointReverse(p);
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698