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

Side by Side Diff: skia/ext/skia_utils_win.h

Issue 14079: Move skia_utils into the skia namespace. (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 | « skia/ext/skia_utils.cc ('k') | skia/ext/skia_utils_win.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 #ifndef BASE_GFX_SKIA_UTILS_WIN_H_ 5 #ifndef BASE_GFX_SKIA_UTILS_WIN_H_
6 #define BASE_GFX_SKIA_UTILS_WIN_H_ 6 #define BASE_GFX_SKIA_UTILS_WIN_H_
7 7
8 #include "SkColor.h" 8 #include "SkColor.h"
9 9
10 struct SkIRect; 10 struct SkIRect;
11 struct SkPoint; 11 struct SkPoint;
12 struct SkRect; 12 struct SkRect;
13 typedef unsigned long DWORD; 13 typedef unsigned long DWORD;
14 typedef DWORD COLORREF; 14 typedef DWORD COLORREF;
15 typedef struct tagPOINT POINT; 15 typedef struct tagPOINT POINT;
16 typedef struct tagRECT RECT; 16 typedef struct tagRECT RECT;
17 17
18 namespace gfx { 18 namespace skia {
19 19
20 // Converts a Skia point to a Windows POINT. 20 // Converts a Skia point to a Windows POINT.
21 POINT SkPointToPOINT(const SkPoint& point); 21 POINT SkPointToPOINT(const SkPoint& point);
22 22
23 // Converts a Windows RECT to a Skia rect. 23 // Converts a Windows RECT to a Skia rect.
24 SkRect RECTToSkRect(const RECT& rect); 24 SkRect RECTToSkRect(const RECT& rect);
25 25
26 // Converts a Windows RECT to a Skia rect. 26 // Converts a Windows RECT to a Skia rect.
27 // Both use same in-memory format. Verified by COMPILE_ASSERT() in 27 // Both use same in-memory format. Verified by COMPILE_ASSERT() in
28 // skia_utils.cc. 28 // skia_utils.cc.
29 inline const SkIRect& RECTToSkIRect(const RECT& rect) { 29 inline const SkIRect& RECTToSkIRect(const RECT& rect) {
30 return reinterpret_cast<const SkIRect&>(rect); 30 return reinterpret_cast<const SkIRect&>(rect);
31 } 31 }
32 32
33 // Converts a Skia rect to a Windows RECT. 33 // Converts a Skia rect to a Windows RECT.
34 // Both use same in-memory format. Verified by COMPILE_ASSERT() in 34 // Both use same in-memory format. Verified by COMPILE_ASSERT() in
35 // skia_utils.cc. 35 // skia_utils.cc.
36 inline const RECT& SkIRectToRECT(const SkIRect& rect) { 36 inline const RECT& SkIRectToRECT(const SkIRect& rect) {
37 return reinterpret_cast<const RECT&>(rect); 37 return reinterpret_cast<const RECT&>(rect);
38 } 38 }
39 39
40 // Converts COLORREFs (0BGR) to the ARGB layout Skia expects. 40 // Converts COLORREFs (0BGR) to the ARGB layout Skia expects.
41 SkColor COLORREFToSkColor(COLORREF color); 41 SkColor COLORREFToSkColor(COLORREF color);
42 42
43 // Converts ARGB to COLORREFs (0BGR). 43 // Converts ARGB to COLORREFs (0BGR).
44 COLORREF SkColorToCOLORREF(SkColor color); 44 COLORREF SkColorToCOLORREF(SkColor color);
45 45
46 } // namespace gfx 46 } // namespace skia
47 47
48 #endif // SKIA_EXT_SKIA_UTILS_WIN_H_ 48 #endif // SKIA_EXT_SKIA_UTILS_WIN_H_
49 49
OLDNEW
« no previous file with comments | « skia/ext/skia_utils.cc ('k') | skia/ext/skia_utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698