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

Unified Diff: ui/gfx/color_utils.cc

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « ui/gfx/color_utils.h ('k') | ui/gfx/display.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_utils.cc
diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc
index 494f04b423582eb5c1bdededa09d49e60e6b82ad..574169b670c750d806a1402966d2799ddafd6bc5 100644
--- a/ui/gfx/color_utils.cc
+++ b/ui/gfx/color_utils.cc
@@ -5,21 +5,20 @@
#include "ui/gfx/color_utils.h"
#include <math.h>
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
+#include <stdint.h>
#include <algorithm>
-#include "base/basictypes.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "build/build_config.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/gfx/color_palette.h"
+
#if defined(OS_WIN)
+#include <windows.h>
#include "skia/ext/skia_utils_win.h"
#endif
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/color_palette.h"
namespace color_utils {
@@ -135,14 +134,14 @@ SkColor HSLToSkColor(const HSL& hsl, SkAlpha alpha) {
// If there's no color, we don't care about hue and can do everything based on
// brightness.
if (!saturation) {
- uint8 light;
+ uint8_t light;
if (lightness < 0)
light = 0;
else if (lightness >= 1.0)
light = 255;
else
- light = static_cast<uint8>(SkDoubleToFixed(lightness) >> 8);
+ light = static_cast<uint8_t>(SkDoubleToFixed(lightness) >> 8);
return SkColorSetARGB(alpha, light, light, light);
}
« no previous file with comments | « ui/gfx/color_utils.h ('k') | ui/gfx/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698