OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include "skia/ext/native_drawing_context.h" | 10 #include "skia/ext/native_drawing_context.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // | 39 // |
40 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can | 40 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can |
41 // also provide to allow for drawing by the native platform into the device. | 41 // also provide to allow for drawing by the native platform into the device. |
42 // TODO(robertphillips): Once the bitmap-specific entry points are removed | 42 // TODO(robertphillips): Once the bitmap-specific entry points are removed |
43 // from SkBaseDevice it might make sense for PlatformDevice to be derived | 43 // from SkBaseDevice it might make sense for PlatformDevice to be derived |
44 // from it. | 44 // from it. |
45 class SK_API PlatformDevice { | 45 class SK_API PlatformDevice { |
46 public: | 46 public: |
47 virtual ~PlatformDevice(); | 47 virtual ~PlatformDevice(); |
48 | 48 |
| 49 // Only implemented in bitmap_platform_device_win. |
| 50 #if defined(WIN32) |
49 // The DC that corresponds to the bitmap, used for GDI operations drawing | 51 // The DC that corresponds to the bitmap, used for GDI operations drawing |
50 // into the bitmap. This is possibly heavyweight, so it should be existant | 52 // into the bitmap. This is possibly heavyweight, so it should be existant |
51 // only during one pass of rendering. | 53 // only during one pass of rendering. |
52 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform, | 54 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform, |
53 const SkIRect& clip_bounds) =
0; | 55 const SkIRect& clip_bounds) =
0; |
| 56 #endif |
54 }; | 57 }; |
55 | 58 |
56 } // namespace skia | 59 } // namespace skia |
57 | 60 |
58 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ | 61 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ |
OLD | NEW |