chromeos: bluetooth: add BluetoothInputClient
[chromium-blink-merge.git] / skia / ext / skia_utils_win.h
blobbc2606094cfa4543e490ebda192f6768044f205d
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_
7 #pragma once
9 #include "third_party/skia/include/core/SkColor.h"
11 struct SkIRect;
12 struct SkPoint;
13 struct SkRect;
14 typedef unsigned long DWORD;
15 typedef DWORD COLORREF;
16 typedef struct tagPOINT POINT;
17 typedef struct tagRECT RECT;
19 namespace skia {
21 // Converts a Skia point to a Windows POINT.
22 POINT SkPointToPOINT(const SkPoint& point);
24 // Converts a Windows RECT to a Skia rect.
25 SkRect RECTToSkRect(const RECT& rect);
27 // Converts a Windows RECT to a Skia rect.
28 // Both use same in-memory format. Verified by COMPILE_ASSERT() in
29 // skia_utils.cc.
30 inline const SkIRect& RECTToSkIRect(const RECT& rect) {
31 return reinterpret_cast<const SkIRect&>(rect);
34 // Converts a Skia rect to a Windows RECT.
35 // Both use same in-memory format. Verified by COMPILE_ASSERT() in
36 // skia_utils.cc.
37 inline const RECT& SkIRectToRECT(const SkIRect& rect) {
38 return reinterpret_cast<const RECT&>(rect);
41 // Converts COLORREFs (0BGR) to the ARGB layout Skia expects.
42 SK_API SkColor COLORREFToSkColor(COLORREF color);
44 // Converts ARGB to COLORREFs (0BGR).
45 SK_API COLORREF SkColorToCOLORREF(SkColor color);
47 } // namespace skia
49 #endif // SKIA_EXT_SKIA_UTILS_WIN_H_