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

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

Issue 1325803002: Apply skew on both axes together rather than sequentially on Compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test for skewY Created 5 years, 3 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
« no previous file with comments | « mojo/converters/surfaces/tests/surface_unittest.cc ('k') | ui/gfx/transform.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GFX_TRANSFORM_H_ 5 #ifndef UI_GFX_TRANSFORM_H_
6 #define UI_GFX_TRANSFORM_H_ 6 #define UI_GFX_TRANSFORM_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return gfx::Vector2dF(matrix_.get(0, 0), matrix_.get(1, 1)); 94 return gfx::Vector2dF(matrix_.get(0, 0), matrix_.get(1, 1));
95 } 95 }
96 96
97 // Applies the current transformation on a translation and assigns the result 97 // Applies the current transformation on a translation and assigns the result
98 // to |this|. 98 // to |this|.
99 void Translate(SkMScalar x, SkMScalar y); 99 void Translate(SkMScalar x, SkMScalar y);
100 void Translate3d(SkMScalar x, SkMScalar y, SkMScalar z); 100 void Translate3d(SkMScalar x, SkMScalar y, SkMScalar z);
101 101
102 // Applies the current transformation on a skew and assigns the result 102 // Applies the current transformation on a skew and assigns the result
103 // to |this|. 103 // to |this|.
104 void SkewX(double angle_x); 104 void Skew(double angle_x, double angle_y);
105 void SkewY(double angle_y);
106 105
107 // Applies the current transformation on a perspective transform and assigns 106 // Applies the current transformation on a perspective transform and assigns
108 // the result to |this|. 107 // the result to |this|.
109 void ApplyPerspectiveDepth(SkMScalar depth); 108 void ApplyPerspectiveDepth(SkMScalar depth);
110 109
111 // Applies a transformation on the current transformation 110 // Applies a transformation on the current transformation
112 // (i.e. 'this = this * transform;'). 111 // (i.e. 'this = this * transform;').
113 void PreconcatTransform(const Transform& transform); 112 void PreconcatTransform(const Transform& transform);
114 113
115 // Applies a transformation on the current transformation 114 // Applies a transformation on the current transformation
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 }; 270 };
272 271
273 // This is declared here for use in gtest-based unit tests but is defined in 272 // This is declared here for use in gtest-based unit tests but is defined in
274 // the gfx_test_support target. Depend on that to use this in your unit test. 273 // the gfx_test_support target. Depend on that to use this in your unit test.
275 // This should not be used in production code - call ToString() instead. 274 // This should not be used in production code - call ToString() instead.
276 void PrintTo(const Transform& transform, ::std::ostream* os); 275 void PrintTo(const Transform& transform, ::std::ostream* os);
277 276
278 } // namespace gfx 277 } // namespace gfx
279 278
280 #endif // UI_GFX_TRANSFORM_H_ 279 #endif // UI_GFX_TRANSFORM_H_
OLDNEW
« no previous file with comments | « mojo/converters/surfaces/tests/surface_unittest.cc ('k') | ui/gfx/transform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698