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

Side by Side Diff: webkit/compositor_bindings/web_transformation_matrix_util.cc

Issue 12035029: Finish migrating cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 7 years, 10 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 | « webkit/compositor_bindings/web_transformation_matrix_util.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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/compositor_bindings/web_transformation_matrix_util.h"
6
7 using WebKit::WebTransformationMatrix;
8
9 namespace webkit {
10
11 gfx::Transform WebTransformationMatrixUtil::ToTransform(
12 const WebTransformationMatrix& matrix) {
13 return gfx::Transform(matrix.m11(), matrix.m21(), matrix.m31(), matrix.m41(),
14 matrix.m12(), matrix.m22(), matrix.m32(), matrix.m42(),
15 matrix.m13(), matrix.m23(), matrix.m33(), matrix.m43(),
16 matrix.m14(), matrix.m24(), matrix.m34(), matrix.m44());
17 }
18
19 WebTransformationMatrix WebTransformationMatrixUtil::ToWebTransformationMatrix(
20 const gfx::Transform& transform) {
21 return WebTransformationMatrix(transform.matrix().getDouble(0, 0),
22 transform.matrix().getDouble(1, 0),
23 transform.matrix().getDouble(2, 0),
24 transform.matrix().getDouble(3, 0),
25 transform.matrix().getDouble(0, 1),
26 transform.matrix().getDouble(1, 1),
27 transform.matrix().getDouble(2, 1),
28 transform.matrix().getDouble(3, 1),
29 transform.matrix().getDouble(0, 2),
30 transform.matrix().getDouble(1, 2),
31 transform.matrix().getDouble(2, 2),
32 transform.matrix().getDouble(3, 2),
33 transform.matrix().getDouble(0, 3),
34 transform.matrix().getDouble(1, 3),
35 transform.matrix().getDouble(2, 3),
36 transform.matrix().getDouble(3, 3));
37
38 }
39
40 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_transformation_matrix_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698