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

Side by Side Diff: ui/gfx/transform.cc

Issue 8368013: Improve Aura overdraw by changing hole calculation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer diff Created 9 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 | Annotate | Revision Log
« ui/gfx/compositor/layer_unittest.cc ('K') | « ui/gfx/transform.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/gfx/transform.h" 5 #include "ui/gfx/transform.h"
6 #include "ui/gfx/point3.h" 6 #include "ui/gfx/point3.h"
7 #include "ui/gfx/rect.h" 7 #include "ui/gfx/rect.h"
8 #include "ui/gfx/skia_util.h" 8 #include "ui/gfx/skia_util.h"
9 9
10 namespace { 10 namespace {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void Transform::ConcatTransform(const Transform& transform) { 95 void Transform::ConcatTransform(const Transform& transform) {
96 if (!transform.matrix_.isIdentity()) { 96 if (!transform.matrix_.isIdentity()) {
97 matrix_.postConcat(transform.matrix_); 97 matrix_.postConcat(transform.matrix_);
98 } 98 }
99 } 99 }
100 100
101 bool Transform::HasChange() const { 101 bool Transform::HasChange() const {
102 return !matrix_.isIdentity(); 102 return !matrix_.isIdentity();
103 } 103 }
104 104
105 bool Transform::Invert() {
106 return matrix_.invert(&matrix_);
107 }
108
105 void Transform::TransformPoint(gfx::Point& point) const { 109 void Transform::TransformPoint(gfx::Point& point) const {
106 TransformPointInternal(matrix_, point); 110 TransformPointInternal(matrix_, point);
107 } 111 }
108 112
109 void Transform::TransformPoint(gfx::Point3f& point) const { 113 void Transform::TransformPoint(gfx::Point3f& point) const {
110 TransformPointInternal(matrix_, point); 114 TransformPointInternal(matrix_, point);
111 } 115 }
112 116
113 bool Transform::TransformPointReverse(gfx::Point& point) const { 117 bool Transform::TransformPointReverse(gfx::Point& point) const {
114 // TODO(sad): Try to avoid trying to invert the matrix. 118 // TODO(sad): Try to avoid trying to invert the matrix.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 0, 177 0,
174 1 }; 178 1 };
175 179
176 xform.map(p); 180 xform.map(p);
177 181
178 point.SetPoint(SymmetricRound(p[0]), 182 point.SetPoint(SymmetricRound(p[0]),
179 SymmetricRound(p[1])); 183 SymmetricRound(p[1]));
180 } 184 }
181 185
182 } // namespace ui 186 } // namespace ui
OLDNEW
« ui/gfx/compositor/layer_unittest.cc ('K') | « ui/gfx/transform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698