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

Unified Diff: ash/display/display_controller.cc

Issue 14361002: Use GetInverse (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « ash/ash_root_window_transformer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index ed85e945c80a4b2b1f8dde95385fb3025a990659..89f2d3e9d411cb0f6f51e6145dd86fb755c37ce9 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -151,12 +151,6 @@ void RotateRootWindow(aura::RootWindow* root_window,
root_window->SetProperty(kRotationPropertyKey, info.rotation());
#endif
gfx::Transform rotate;
- // TODO(oshima): Manually complute the inverse of the
- // rotate+translate matrix to compensate for computation error in
- // the inverted matrix. Ideally, SkMatrix should have special
- // case handling for rotate+translate case. crbug.com/222483.
- gfx::Transform reverse_rotate;
-
// The origin is (0, 0), so the translate width/height must be reduced by
// 1 pixel.
float one_pixel = 1.0f / display.device_scale_factor();
@@ -166,31 +160,22 @@ void RotateRootWindow(aura::RootWindow* root_window,
case gfx::Display::ROTATE_90:
rotate.Translate(display.bounds().height() - one_pixel, 0);
rotate.Rotate(90);
- reverse_rotate.Rotate(270);
- reverse_rotate.Translate(-(display.bounds().height() - one_pixel), 0);
break;
case gfx::Display::ROTATE_270:
rotate.Translate(0, display.bounds().width() - one_pixel);
rotate.Rotate(270);
- reverse_rotate.Rotate(90);
- reverse_rotate.Translate(0, -(display.bounds().width() - one_pixel));
break;
case gfx::Display::ROTATE_180:
rotate.Translate(display.bounds().width() - one_pixel,
display.bounds().height() - one_pixel);
rotate.Rotate(180);
- reverse_rotate.Rotate(180);
- reverse_rotate.Translate(-(display.bounds().width() - one_pixel),
- -(display.bounds().height() - one_pixel));
break;
}
RoundNearZero(&rotate);
- RoundNearZero(&reverse_rotate);
scoped_ptr<aura::RootWindowTransformer> transformer(
new AshRootWindowTransformer(root_window,
rotate,
- reverse_rotate,
info.GetOverscanInsetsInPixel(),
info.ui_scale()));
root_window->SetRootWindowTransformer(transformer.Pass());
« no previous file with comments | « ash/ash_root_window_transformer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698