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 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 11 matching lines...) Expand all Loading... | |
22 namespace skia { | 22 namespace skia { |
23 | 23 |
24 class PlatformDevice; | 24 class PlatformDevice; |
25 class ScopedPlatformPaint; | 25 class ScopedPlatformPaint; |
26 | 26 |
27 // The following routines provide accessor points for the functionality | 27 // The following routines provide accessor points for the functionality |
28 // exported by the various PlatformDevice ports. | 28 // exported by the various PlatformDevice ports. |
29 // All calls to PlatformDevice::* should be routed through these | 29 // All calls to PlatformDevice::* should be routed through these |
30 // helper functions. | 30 // helper functions. |
31 | 31 |
32 // Bind a PlatformDevice instance, |platform_device| to |device|. Subsequent | 32 // DEPRECATED |
33 // calls to the functions exported below will forward the request to the | 33 // Bind a PlatformDevice instance, |platform_device|, to |device|. |
34 // corresponding method on the bound PlatformDevice instance. If no | 34 void SetPlatformDevice(SkBaseDevice* device, PlatformDevice* platform_device); |
35 // PlatformDevice has been bound to the SkBaseDevice passed, then the | 35 |
36 // routines are NOPS. | 36 // DEPRECATED |
37 SK_API void SetPlatformDevice(SkBaseDevice* device, | 37 // Retrieve the previous argument to SetPlatformDevice(). |
f(malita)
2016/08/30 17:41:23
Same comment about exporting.
tomhudson
2016/08/30 17:48:48
Done.
| |
38 PlatformDevice* platform_device); | 38 PlatformDevice* GetPlatformDevice(SkBaseDevice* device); |
39 SK_API PlatformDevice* GetPlatformDevice(SkBaseDevice* device); | |
40 | 39 |
41 // A SkBitmapDevice is basically a wrapper around SkBitmap that provides a | 40 // A SkBitmapDevice is basically a wrapper around SkBitmap that provides a |
42 // surface for SkCanvas to draw into. PlatformDevice provides a surface | 41 // surface for SkCanvas to draw into. PlatformDevice provides a surface |
43 // Windows can also write to. It also provides functionality to play well | 42 // Windows can also write to. It also provides functionality to play well |
44 // with GDI drawing functions. This class is abstract and must be subclassed. | 43 // with GDI drawing functions. This class is abstract and must be subclassed. |
45 // It provides the basic interface to implement it either with or without | 44 // It provides the basic interface to implement it either with or without |
46 // a bitmap backend. | 45 // a bitmap backend. |
47 // | 46 // |
48 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can | 47 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can |
49 // also provide to allow for drawing by the native platform into the device. | 48 // also provide to allow for drawing by the native platform into the device. |
(...skipping 18 matching lines...) Expand all Loading... | |
68 // only during one pass of rendering. | 67 // only during one pass of rendering. |
69 virtual PlatformSurface BeginPlatformPaint(const SkMatrix& transform, | 68 virtual PlatformSurface BeginPlatformPaint(const SkMatrix& transform, |
70 const SkIRect& clip_bounds); | 69 const SkIRect& clip_bounds); |
71 | 70 |
72 friend class ScopedPlatformPaint; | 71 friend class ScopedPlatformPaint; |
73 }; | 72 }; |
74 | 73 |
75 } // namespace skia | 74 } // namespace skia |
76 | 75 |
77 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ | 76 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ |
OLD | NEW |