Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: skia/ext/bitmap_platform_device_mac.h

Issue 126140: Properly use data when creating a bitmap platform canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_mac.h
===================================================================
--- skia/ext/bitmap_platform_device_mac.h (revision 18385)
+++ skia/ext/bitmap_platform_device_mac.h (working copy)
@@ -25,18 +25,16 @@
// DEVICE'S PIXEL DATA TO ANOTHER BITMAP, make sure you copy instead.
class BitmapPlatformDevice : public PlatformDevice {
public:
- // Factory function. The screen DC is used to create the bitmap, and will not
- // be stored beyond this function. is_opaque should be set if the caller
- // knows the bitmap will be completely opaque and allows some optimizations.
- //
- // The shared_section parameter is optional (pass NULL for default behavior).
- // If shared_section is non-null, then it must be a handle to a file-mapping
- // object returned by CreateFileMapping. See CreateDIBSection for details.
- static BitmapPlatformDevice* Create(CGContextRef context,
- int width,
- int height,
- bool is_opaque);
+ // |context| may be NULL.
+ static BitmapPlatformDevice* CreateWithContext(CGContextRef context,
+ int width, int height,
+ bool is_opaque);
+ // Creates a context for |data| and calls CreateWithContext.
+ static BitmapPlatformDevice* CreateWithData(uint8_t* data,
+ int width, int height,
+ bool is_opaque);
+
// Copy constructor. When copied, devices duplicate their internal data, so
// stay linked. This is because their implementation is very heavyweight
// (lots of memory and CoreGraphics state). If a device has been copied, both
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698