Chromium Code Reviews| 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..0315a7e2cf4d8d22c638cbc99149101000983923 100644 |
| --- a/ui/gfx/compositor/compositor_win.cc |
| +++ b/ui/gfx/compositor/compositor_win.cc |
| @@ -350,21 +350,10 @@ 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()); |
| // 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); |
| + float transform_data_buffer[16]; |
| + transform.matrix().asColMajorf(transform_data_buffer); |
|
sky
2011/06/16 23:06:56
I can't remember which is which. Did you make sure
|
| + D3DXMATRIX transform_matrix(&transform_data_buffer[0]); |
| // Scale so x and y are from 0-2. |
| D3DXMATRIX scale_matrix; |
| @@ -391,6 +380,7 @@ void CompositorWin::UpdatePerspective(const ui::Transform& transform, |
| D3DXMATRIX wvp = transform_matrix * scale_matrix * translate_matrix * view * |
| projection_matrix; |
| + |
| fx_->GetVariableByName("gWVP")->AsMatrix()->SetMatrix(wvp); |
| } |