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

Unified Diff: ui/gfx/compositor/compositor_win.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: removed unused header in gl compositor Created 9 years, 6 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
Index: ui/gfx/compositor/compositor_win.cc
diff --git a/ui/gfx/compositor/compositor_win.cc b/ui/gfx/compositor/compositor_win.cc
index ddb978761cb7ed8b271bc7c87cc4c1f81e03a11a..1793e24c2d141515311e67543723548197f621c9 100644
--- a/ui/gfx/compositor/compositor_win.cc
+++ b/ui/gfx/compositor/compositor_win.cc
@@ -351,20 +351,13 @@ void CompositorWin::Init() {
void CompositorWin::UpdatePerspective(const ui::Transform& transform,
const gfx::Size& view_size) {
// Apply transform from view.
- const SkMatrix& sk_matrix(transform.matrix());
+ const SkMatrix44& m(transform.matrix());
// Use -1 * kMTransY for y-translation as origin for views is upper left.
D3DXMATRIX transform_matrix(
- // row 1
- sk_matrix[SkMatrix::kMScaleX], sk_matrix[SkMatrix::kMSkewX], 0.0f,
- sk_matrix[SkMatrix::kMPersp0],
- // row 2
- sk_matrix[SkMatrix::kMSkewY], sk_matrix[SkMatrix::kMScaleY], 0.0f,
- sk_matrix[SkMatrix::kMPersp1],
- // row 3
- 0.0f, 0.0f, 1.0f, sk_matrix[SkMatrix::kMPersp2],
- // row 4.
- sk_matrix[SkMatrix::kMTransX], -sk_matrix[SkMatrix::kMTransY], 0.0f,
- 1.0f);
+ m.get(0,0), m.get(1,0), m.get(2,0), m.get(3,0),
rjkroege 2011/06/10 17:52:14 same comment as the GL case. Is there not a way to
+ m.get(0,1), m.get(1,1), m.get(2,1), m.get(3,1),
+ m.get(0,2), m.get(1,2), m.get(2,2), m.get(3,2),
+ m.get(0,3), m.get(1,3), m.get(2,3), m.get(3,3));
// Scale so x and y are from 0-2.
D3DXMATRIX scale_matrix;

Powered by Google App Engine
This is Rietveld 408576698