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

Unified Diff: ui/gfx/compositor/compositor_gl.cc

Issue 7044062: Use SkMatrix44 for the underlying implementation of ui::Transform (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Gardening patch Created 9 years, 5 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/gfx/canvas_skia.cc ('k') | ui/gfx/compositor/compositor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_gl.cc
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
index 707402d9354c0d675e55681b4ea7e178d761e64b..198662a15315425093d4b32b4c9f42b9b152969d 100644
--- a/ui/gfx/compositor/compositor_gl.cc
+++ b/ui/gfx/compositor/compositor_gl.cc
@@ -273,30 +273,7 @@ void TextureGL::DrawInternal(const ui::TextureProgramGL& program,
t.ConcatScale(2.0f/window_size.width(), 2.0f/window_size.height());
GLfloat m[16];
- const SkMatrix& matrix = t.matrix();
-
- // Convert 3x3 view transform matrix (row major) into 4x4 GL matrix (column
- // major). Assume 2-D rotations/translations restricted to XY plane.
-
- m[ 0] = matrix[0];
- m[ 1] = matrix[3];
- m[ 2] = 0;
- m[ 3] = matrix[6];
-
- m[ 4] = matrix[1];
- m[ 5] = matrix[4];
- m[ 6] = 0;
- m[ 7] = matrix[7];
-
- m[ 8] = 0;
- m[ 9] = 0;
- m[10] = 1;
- m[11] = 0;
-
- m[12] = matrix[2];
- m[13] = matrix[5];
- m[14] = 0;
- m[15] = matrix[8];
+ t.matrix().asColMajorf(m);
static const GLfloat vertices[] = { -1., -1., +0., +0., +1.,
+1., -1., +0., +1., +1.,
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/compositor/compositor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698