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_CANVAS_H_ | 5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_ |
6 #define SKIA_EXT_PLATFORM_CANVAS_H_ | 6 #define SKIA_EXT_PLATFORM_CANVAS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // The platform-specific device will include the necessary platform headers | 9 // The platform-specific device will include the necessary platform headers |
10 // to get the surface type. | 10 // to get the surface type. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 // Calling SkCanvas' version will create a new device which is not compatible | 107 // Calling SkCanvas' version will create a new device which is not compatible |
108 // with us and we will crash if somebody tries to draw into it with | 108 // with us and we will crash if somebody tries to draw into it with |
109 // CoreGraphics. | 109 // CoreGraphics. |
110 virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap); | 110 virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap); |
111 | 111 |
112 // Disallow copy and assign. | 112 // Disallow copy and assign. |
113 PlatformCanvas(const PlatformCanvas&); | 113 PlatformCanvas(const PlatformCanvas&); |
114 PlatformCanvas& operator=(const PlatformCanvas&); | 114 PlatformCanvas& operator=(const PlatformCanvas&); |
115 }; | 115 }; |
116 | 116 |
117 // These calls should surround calls to platform drawing routines, the | |
118 // surface returned here can be used with the native platform routines | |
vangelis
2011/04/01 23:35:53
Period missing from the end of the comment.
alokp
2011/04/04 17:00:13
Done.
| |
119 // | |
120 // Call EndPlatformPaint when you are done and want to use skia operations | |
121 // after calling the platform-specific BeginPlatformPaint; this will | |
122 // synchronize the bitmap to OS if necessary. | |
123 // | |
124 // Note: These functions will eventually replace | |
125 // PlatformCanvas::beginPlatformPaint and PlatformCanvas::endPlatformPaint. | |
126 SK_API PlatformDevice::PlatformSurface BeginPlatformPaint(SkCanvas* canvas); | |
127 SK_API void EndPlatformPaint(SkCanvas* canvas); | |
128 | |
117 } // namespace skia | 129 } // namespace skia |
118 | 130 |
119 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ | 131 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ |
OLD | NEW |