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

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

Issue 12842: Move convolver, image_operations, and skia_utils from base/gfx to skia/ext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.cc ('k') | chrome/common/gfx/icon_util.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 #include "build/build_config.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
11 11
12 #include "chrome/common/gfx/color_utils.h" 12 #include "chrome/common/gfx/color_utils.h"
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/gfx/skia_utils.h"
16 #include "base/logging.h" 15 #include "base/logging.h"
17 #include "skia/include/SkBitmap.h" 16 #include "skia/include/SkBitmap.h"
18 17
18 #if defined(OS_WIN)
19 #include "skia/ext/skia_utils_win.h"
20 #endif
21
19 namespace color_utils { 22 namespace color_utils {
20 23
21 // These transformations are based on the equations in: 24 // These transformations are based on the equations in:
22 // http://en.wikipedia.org/wiki/Lab_color 25 // http://en.wikipedia.org/wiki/Lab_color
23 // http://en.wikipedia.org/wiki/SRGB_color_space#Specification_of_the_transforma tion 26 // http://en.wikipedia.org/wiki/SRGB_color_space#Specification_of_the_transforma tion
24 // See also: 27 // See also:
25 // http://www.brucelindbloom.com/index.html?ColorCalculator.html 28 // http://www.brucelindbloom.com/index.html?ColorCalculator.html
26 29
27 static const double kCIEConversionAlpha = 0.055; 30 static const double kCIEConversionAlpha = 0.055;
28 static const double kCIEConversionGamma = 2.2; 31 static const double kCIEConversionGamma = 2.2;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 248 }
246 } 249 }
247 } 250 }
248 251
249 SkColor SetColorAlpha(SkColor c, SkAlpha alpha) { 252 SkColor SetColorAlpha(SkColor c, SkAlpha alpha) {
250 return SkColorSetARGB(alpha, SkColorGetR(c), SkColorGetG(c), SkColorGetB(c)); 253 return SkColorSetARGB(alpha, SkColorGetR(c), SkColorGetG(c), SkColorGetB(c));
251 } 254 }
252 255
253 SkColor GetSysSkColor(int which) { 256 SkColor GetSysSkColor(int which) {
254 #if defined(OS_WIN) 257 #if defined(OS_WIN)
255 return gfx::COLORREFToSkColor(::GetSysColor(which)); 258 return skia::COLORREFToSkColor(::GetSysColor(which));
256 #else 259 #else
257 NOTIMPLEMENTED(); 260 NOTIMPLEMENTED();
258 return SK_ColorLTGRAY; 261 return SK_ColorLTGRAY;
259 #endif 262 #endif
260 } 263 }
261 264
262 } // namespace color_utils 265 } // namespace color_utils
263 266
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.cc ('k') | chrome/common/gfx/icon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698