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

Side by Side Diff: ash/display/root_window_transformers.cc

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/root_window_transformers.h" 5 #include "ash/display/root_window_transformers.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/display/display_info.h" 9 #include "ash/display/display_info.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 11 matching lines...) Expand all
22 #include "ui/gfx/size_conversions.h" 22 #include "ui/gfx/size_conversions.h"
23 #include "ui/gfx/transform.h" 23 #include "ui/gfx/transform.h"
24 #include "ui/gfx/transform.h" 24 #include "ui/gfx/transform.h"
25 25
26 DECLARE_WINDOW_PROPERTY_TYPE(gfx::Display::Rotation); 26 DECLARE_WINDOW_PROPERTY_TYPE(gfx::Display::Rotation);
27 27
28 namespace ash { 28 namespace ash {
29 namespace internal { 29 namespace internal {
30 namespace { 30 namespace {
31 31
32 #if defined(OS_WIN)
32 DEFINE_WINDOW_PROPERTY_KEY(gfx::Display::Rotation, kRotationPropertyKey, 33 DEFINE_WINDOW_PROPERTY_KEY(gfx::Display::Rotation, kRotationPropertyKey,
33 gfx::Display::ROTATE_0); 34 gfx::Display::ROTATE_0);
35 #endif
34 36
35 // Round near zero value to zero. 37 // Round near zero value to zero.
36 void RoundNearZero(gfx::Transform* transform) { 38 void RoundNearZero(gfx::Transform* transform) {
37 const float kEpsilon = 0.001f; 39 const float kEpsilon = 0.001f;
38 SkMatrix44& matrix = transform->matrix(); 40 SkMatrix44& matrix = transform->matrix();
39 for (int x = 0; x < 4; ++x) { 41 for (int x = 0; x < 4; ++x) {
40 for (int y = 0; y < 4; ++y) { 42 for (int y = 0; y < 4; ++y) {
41 if (std::abs(SkMScalarToFloat(matrix.get(x, y))) < kEpsilon) 43 if (std::abs(SkMScalarToFloat(matrix.get(x, y))) < kEpsilon)
42 matrix.set(x, y, SkFloatToMScalar(0.0f)); 44 matrix.set(x, y, SkFloatToMScalar(0.0f));
43 } 45 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 284
283 aura::RootWindowTransformer* CreateRootWindowTransformerForMirroredDisplay( 285 aura::RootWindowTransformer* CreateRootWindowTransformerForMirroredDisplay(
284 const DisplayInfo& source_display_info, 286 const DisplayInfo& source_display_info,
285 const DisplayInfo& mirror_display_info) { 287 const DisplayInfo& mirror_display_info) {
286 return new MirrorRootWindowTransformer(source_display_info, 288 return new MirrorRootWindowTransformer(source_display_info,
287 mirror_display_info); 289 mirror_display_info);
288 } 290 }
289 291
290 } // namespace internal 292 } // namespace internal
291 } // namespace ash 293 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_controller.cc ('k') | ash/launcher/launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698