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

Side by Side Diff: chrome/common/gfx/color_utils.cc

Issue 2929: Some initial work on compiling chrome/common/ on Linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/debug_flags.cc ('k') | chrome/common/jpeg_codec.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h"
5 6
6 #include <math.h> 7 #include <math.h>
8 #if defined(OS_WIN)
7 #include <windows.h> 9 #include <windows.h>
10 #endif
8 11
9 #include "chrome/common/gfx/color_utils.h" 12 #include "chrome/common/gfx/color_utils.h"
10 13
11 #include "base/basictypes.h" 14 #include "base/basictypes.h"
12 #include "base/gfx/skia_utils.h" 15 #include "base/gfx/skia_utils.h"
13 #include "base/logging.h" 16 #include "base/logging.h"
14 #include "skia/include/SkBitmap.h" 17 #include "skia/include/SkBitmap.h"
15 18
16 namespace color_utils { 19 namespace color_utils {
17 20
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 histogram[GetLumaForColor(current_color)]++; 244 histogram[GetLumaForColor(current_color)]++;
242 } 245 }
243 } 246 }
244 } 247 }
245 248
246 SkColor SetColorAlpha(SkColor c, SkAlpha alpha) { 249 SkColor SetColorAlpha(SkColor c, SkAlpha alpha) {
247 return SkColorSetARGB(alpha, SkColorGetR(c), SkColorGetG(c), SkColorGetB(c)); 250 return SkColorSetARGB(alpha, SkColorGetR(c), SkColorGetG(c), SkColorGetB(c));
248 } 251 }
249 252
250 SkColor GetSysSkColor(int which) { 253 SkColor GetSysSkColor(int which) {
254 #if defined(OS_WIN)
251 return gfx::COLORREFToSkColor(::GetSysColor(which)); 255 return gfx::COLORREFToSkColor(::GetSysColor(which));
256 #else
257 NOTIMPLEMENTED();
258 return SK_ColorLTGRAY;
259 #endif
252 } 260 }
253 261
254 } // namespace color_utils 262 } // namespace color_utils
255 263
OLDNEW
« no previous file with comments | « chrome/common/debug_flags.cc ('k') | chrome/common/jpeg_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698