Index: skia/ext/platform_canvas.h |
=================================================================== |
--- skia/ext/platform_canvas.h (revision 80714) |
+++ skia/ext/platform_canvas.h (working copy) |
@@ -114,6 +114,23 @@ |
PlatformCanvas& operator=(const PlatformCanvas&); |
}; |
+// Creates a canvas with raster bitmap backing. |
+// Set is_opaque if you are going to erase the bitmap and not use |
+// transparency: this will enable some optimizations. |
+SK_API SkCanvas* CreateBitmapCanvas(int width, int height, bool is_opaque); |
gwright
2011/04/07 15:28:12
Do we want an is_offscreen parameter here as well?
alokp
2011/04/07 15:57:36
May be. The one I am replacing in webkit does not
|
+ |
+// These calls should surround calls to platform drawing routines, the |
+// surface returned here can be used with the native platform routines. |
+// |
+// Call EndPlatformPaint when you are done and want to use skia operations |
+// after calling the platform-specific BeginPlatformPaint; this will |
+// synchronize the bitmap to OS if necessary. |
+// |
+// Note: These functions will eventually replace |
+// PlatformCanvas::beginPlatformPaint and PlatformCanvas::endPlatformPaint. |
+SK_API PlatformDevice::PlatformSurface BeginPlatformPaint(SkCanvas* canvas); |
+SK_API void EndPlatformPaint(SkCanvas* canvas); |
+ |
} // namespace skia |
#endif // SKIA_EXT_PLATFORM_CANVAS_H_ |