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

Unified Diff: ash/display/root_window_transformers.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: ash/display/root_window_transformers.cc
diff --git a/ash/display/root_window_transformers.cc b/ash/display/root_window_transformers.cc
index cab2cec870b3c4a8b052bb25b5fe454adb8e90b3..84b8f7600b6b0d545a945df34e27f73b1e03fb6b 100644
--- a/ash/display/root_window_transformers.cc
+++ b/ash/display/root_window_transformers.cc
@@ -56,7 +56,7 @@ gfx::Transform CreateRotationTransform(aura::Window* root_window,
DisplayInfo info =
Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
- // TODO(oshima): Add animation. (crossfade+rotation, or just cross-fade)
+// TODO(oshima): Add animation. (crossfade+rotation, or just cross-fade)
#if defined(OS_WIN)
// Windows 8 bots refused to resize the host window, and
// updating the transform results in incorrectly resizing
@@ -128,9 +128,7 @@ gfx::Transform CreateInsetsAndScaleTransform(const gfx::Insets& insets,
gfx::Transform CreateMirrorTransform(const display::Display& display) {
gfx::Transform transform;
- transform.matrix().set3x3(-1, 0, 0,
- 0, 1, 0,
- 0, 0, 1);
+ transform.matrix().set3x3(-1, 0, 0, 0, 1, 0, 0, 0, 1);
transform.Translate(-display.size().width(), 0);
return transform;
}
@@ -224,27 +222,27 @@ class MirrorRootWindowTransformer : public RootWindowTransformer {
gfx::Rect(mirror_display_info.bounds_in_native().size());
bool letterbox = root_bounds_.width() * mirror_display_rect.height() >
- root_bounds_.height() * mirror_display_rect.width();
+ root_bounds_.height() * mirror_display_rect.width();
if (letterbox) {
float mirror_scale_ratio =
(static_cast<float>(root_bounds_.width()) /
static_cast<float>(mirror_display_rect.width()));
float inverted_scale = 1.0f / mirror_scale_ratio;
- int margin = static_cast<int>(
- (mirror_display_rect.height() -
- root_bounds_.height() * inverted_scale) / 2);
+ int margin = static_cast<int>((mirror_display_rect.height() -
+ root_bounds_.height() * inverted_scale) /
+ 2);
insets_.Set(0, margin, 0, margin);
- transform_.Translate(0, margin);
+ transform_.Translate(0, margin);
transform_.Scale(inverted_scale, inverted_scale);
} else {
float mirror_scale_ratio =
(static_cast<float>(root_bounds_.height()) /
static_cast<float>(mirror_display_rect.height()));
float inverted_scale = 1.0f / mirror_scale_ratio;
- int margin = static_cast<int>(
- (mirror_display_rect.width() -
- root_bounds_.width() * inverted_scale) / 2);
+ int margin = static_cast<int>((mirror_display_rect.width() -
+ root_bounds_.width() * inverted_scale) /
+ 2);
insets_.Set(margin, 0, margin, 0);
transform_.Translate(margin, 0);
« no previous file with comments | « ash/display/resolution_notification_controller_unittest.cc ('k') | ash/display/root_window_transformers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698