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

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

Issue 1447893002: compositor-worker: Introduce WebCompositorMutableState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 22 matching lines...) Expand all
33 Transform() : matrix_(SkMatrix44::kIdentity_Constructor) {} 33 Transform() : matrix_(SkMatrix44::kIdentity_Constructor) {}
34 34
35 // Skips initializing this matrix to avoid overhead, when we know it will be 35 // Skips initializing this matrix to avoid overhead, when we know it will be
36 // initialized before use. 36 // initialized before use.
37 Transform(SkipInitialization) 37 Transform(SkipInitialization)
38 : matrix_(SkMatrix44::kUninitialized_Constructor) {} 38 : matrix_(SkMatrix44::kUninitialized_Constructor) {}
39 Transform(const Transform& rhs) : matrix_(rhs.matrix_) {} 39 Transform(const Transform& rhs) : matrix_(rhs.matrix_) {}
40 // Initialize with the concatenation of lhs * rhs. 40 // Initialize with the concatenation of lhs * rhs.
41 Transform(const Transform& lhs, const Transform& rhs) 41 Transform(const Transform& lhs, const Transform& rhs)
42 : matrix_(lhs.matrix_, rhs.matrix_) {} 42 : matrix_(lhs.matrix_, rhs.matrix_) {}
43 explicit Transform(const SkMatrix44& matrix) : matrix_(matrix) {}
43 // Constructs a transform from explicit 16 matrix elements. Elements 44 // Constructs a transform from explicit 16 matrix elements. Elements
44 // should be given in row-major order. 45 // should be given in row-major order.
45 Transform(SkMScalar col1row1, 46 Transform(SkMScalar col1row1,
46 SkMScalar col2row1, 47 SkMScalar col2row1,
47 SkMScalar col3row1, 48 SkMScalar col3row1,
48 SkMScalar col4row1, 49 SkMScalar col4row1,
49 SkMScalar col1row2, 50 SkMScalar col1row2,
50 SkMScalar col2row2, 51 SkMScalar col2row2,
51 SkMScalar col3row2, 52 SkMScalar col3row2,
52 SkMScalar col4row2, 53 SkMScalar col4row2,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 }; 271 };
271 272
272 // This is declared here for use in gtest-based unit tests but is defined in 273 // This is declared here for use in gtest-based unit tests but is defined in
273 // the gfx_test_support target. Depend on that to use this in your unit test. 274 // the gfx_test_support target. Depend on that to use this in your unit test.
274 // This should not be used in production code - call ToString() instead. 275 // This should not be used in production code - call ToString() instead.
275 void PrintTo(const Transform& transform, ::std::ostream* os); 276 void PrintTo(const Transform& transform, ::std::ostream* os);
276 277
277 } // namespace gfx 278 } // namespace gfx
278 279
279 #endif // UI_GFX_TRANSFORM_H_ 280 #endif // UI_GFX_TRANSFORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698