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

Unified Diff: skia/ext/bitmap_platform_device_win.h

Issue 9416017: Optionally clear PlatformCanvas instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address comments. Created 8 years, 9 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 | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_win.h
===================================================================
--- skia/ext/bitmap_platform_device_win.h (revision 127021)
+++ skia/ext/bitmap_platform_device_win.h (working copy)
@@ -32,16 +32,27 @@
// 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(HDC screen_dc, int width, int height,
+ // 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. If |shared_section| is null, the bitmap backing store is not
+ // initialized.
+ static BitmapPlatformDevice* Create(HDC screen_dc, int width, int height,
bool is_opaque, HANDLE shared_section);
// This version is the same as above but will get the screen DC itself.
- static BitmapPlatformDevice* create(int width, int height, bool is_opaque,
+ static BitmapPlatformDevice* Create(int width, int height, bool is_opaque,
HANDLE shared_section);
+ // Create a BitmapPlatformDevice with no shared section. The bitmap is not
+ // initialized to 0.
+ static BitmapPlatformDevice* Create(int width, int height, bool is_opaque);
+
+ // Creates a BitmapPlatformDevice instance respecting the parameters as above.
+ // If |is_opaque| is false, then the bitmap is initialzed to 0.
+ static BitmapPlatformDevice* CreateAndClear(int width, int height,
+ bool is_opaque);
+
virtual ~BitmapPlatformDevice();
// PlatformDevice overrides
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698