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) | |
51 // The DC that corresponds to the bitmap, used for GDI operations drawing | 49 // The DC that corresponds to the bitmap, used for GDI operations drawing |
52 // into the bitmap. This is possibly heavyweight, so it should be existant | 50 // into the bitmap. This is possibly heavyweight, so it should be existant |
53 // only during one pass of rendering. | 51 // only during one pass of rendering. |
54 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform, | 52 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform, |
55 const SkIRect& clip_bounds) =
0; | 53 const SkIRect& clip_bounds) =
0; |
56 #endif | |
57 }; | 54 }; |
58 | 55 |
59 } // namespace skia | 56 } // namespace skia |
60 | 57 |
61 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ | 58 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ |
OLD | NEW |