OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 SKIA_EXT_PLATFORM_DEVICE_H_ | 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_H_ |
6 #define SKIA_EXT_PLATFORM_DEVICE_H_ | 6 #define SKIA_EXT_PLATFORM_DEVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // This file provides an easy way to include the appropriate PlatformDevice | 9 // This file provides an easy way to include the appropriate PlatformDevice |
10 // header file for your platform. | 10 // header file for your platform. |
11 | 11 |
12 #if defined(WIN32) | 12 #if defined(WIN32) |
13 #include <windows.h> | 13 #include <windows.h> |
14 #endif | 14 #endif |
15 | 15 |
16 #include "third_party/skia/include/core/SkPreConfig.h" | 16 #include "third_party/skia/include/core/SkPreConfig.h" |
17 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
18 | 18 |
19 | 19 |
20 class SkDevice; | 20 class SkDevice; |
21 struct SkIRect; | 21 struct SkIRect; |
22 | 22 |
23 #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) | 23 #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || define
d(__sun) |
24 typedef struct _cairo cairo_t; | 24 typedef struct _cairo cairo_t; |
25 typedef struct _cairo_rectangle cairo_rectangle_t; | 25 typedef struct _cairo_rectangle cairo_rectangle_t; |
26 #elif defined(__APPLE__) | 26 #elif defined(__APPLE__) |
27 typedef struct CGContext* CGContextRef; | 27 typedef struct CGContext* CGContextRef; |
28 typedef struct CGRect CGRect; | 28 typedef struct CGRect CGRect; |
29 #endif | 29 #endif |
30 | 30 |
31 namespace skia { | 31 namespace skia { |
32 | 32 |
33 class PlatformDevice; | 33 class PlatformDevice; |
34 | 34 |
35 #if defined(WIN32) | 35 #if defined(WIN32) |
36 typedef HDC PlatformSurface; | 36 typedef HDC PlatformSurface; |
37 typedef RECT PlatformRect; | 37 typedef RECT PlatformRect; |
38 #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) | 38 #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defi
ned(__sun) |
39 typedef cairo_t* PlatformSurface; | 39 typedef cairo_t* PlatformSurface; |
40 typedef cairo_rectangle_t PlatformRect; | 40 typedef cairo_rectangle_t PlatformRect; |
41 #elif defined(__APPLE__) | 41 #elif defined(__APPLE__) |
42 typedef CGContextRef PlatformSurface; | 42 typedef CGContextRef PlatformSurface; |
43 typedef CGRect PlatformRect; | 43 typedef CGRect PlatformRect; |
44 #endif | 44 #endif |
45 | 45 |
46 // The following routines provide accessor points for the functionality | 46 // The following routines provide accessor points for the functionality |
47 // exported by the various PlatformDevice ports. The PlatformDevice, and | 47 // exported by the various PlatformDevice ports. The PlatformDevice, and |
48 // BitmapPlatformDevice classes inherit directly from SkDevice, which is no | 48 // BitmapPlatformDevice classes inherit directly from SkDevice, which is no |
(...skipping 10 matching lines...) Expand all Loading... |
59 PlatformDevice* platform_device); | 59 PlatformDevice* platform_device); |
60 SK_API PlatformDevice* GetPlatformDevice(SkDevice* device); | 60 SK_API PlatformDevice* GetPlatformDevice(SkDevice* device); |
61 | 61 |
62 } // namespace skia | 62 } // namespace skia |
63 | 63 |
64 #if defined(WIN32) | 64 #if defined(WIN32) |
65 #include "skia/ext/platform_device_win.h" | 65 #include "skia/ext/platform_device_win.h" |
66 #elif defined(__APPLE__) | 66 #elif defined(__APPLE__) |
67 #include "skia/ext/platform_device_mac.h" | 67 #include "skia/ext/platform_device_mac.h" |
68 #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ | 68 #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ |
69 defined(__Solaris__) | 69 defined(__sun) |
70 #include "skia/ext/platform_device_linux.h" | 70 #include "skia/ext/platform_device_linux.h" |
71 #endif | 71 #endif |
72 | 72 |
73 #endif | 73 #endif |
OLD | NEW |