MSan: remove test specs for defunct "Browser" testers.
[chromium-blink-merge.git] / skia / ext / skia_utils_win.h
blob6ac5234b6b010e475f22463ebc58f02e8ea8210b
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
3 // found in the LICENSE file.
5 #ifndef SKIA_EXT_SKIA_UTILS_WIN_H_
6 #define SKIA_EXT_SKIA_UTILS_WIN_H_
8 #include "third_party/skia/include/core/SkColor.h"
10 struct SkIRect;
11 struct SkPoint;
12 struct SkRect;
13 typedef unsigned long DWORD;
14 typedef DWORD COLORREF;
15 typedef struct tagPOINT POINT;
16 typedef struct tagRECT RECT;
18 namespace skia {
20 // Converts a Skia point to a Windows POINT.
21 POINT SkPointToPOINT(const SkPoint& point);
23 // Converts a Windows RECT to a Skia rect.
24 SkRect RECTToSkRect(const RECT& rect);
26 // Converts a Windows RECT to a Skia rect.
27 // Both use same in-memory format. Verified by SK_COMPILE_ASSERT() in
28 // skia_utils_win.cc.
29 inline const SkIRect& RECTToSkIRect(const RECT& rect) {
30 return reinterpret_cast<const SkIRect&>(rect);
33 // Converts a Skia rect to a Windows RECT.
34 // Both use same in-memory format. Verified by SK_COMPILE_ASSERT() in
35 // skia_utils_win.cc.
36 inline const RECT& SkIRectToRECT(const SkIRect& rect) {
37 return reinterpret_cast<const RECT&>(rect);
40 // Converts COLORREFs (0BGR) to the ARGB layout Skia expects.
41 SK_API SkColor COLORREFToSkColor(COLORREF color);
43 // Converts ARGB to COLORREFs (0BGR).
44 SK_API COLORREF SkColorToCOLORREF(SkColor color);
46 } // namespace skia
48 #endif // SKIA_EXT_SKIA_UTILS_WIN_H_