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

Unified Diff: skia/ext/bitmap_platform_device_win.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/platform_canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_win.cc
===================================================================
--- skia/ext/bitmap_platform_device_win.cc (revision 167659)
+++ skia/ext/bitmap_platform_device_win.cc (working copy)
@@ -260,14 +260,25 @@
}
SkDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
- SkBitmap::Config config, int width, int height, bool isOpaque,
- Usage /*usage*/) {
+ SkBitmap::Config config, int width, int height, bool isOpaque, Usage) {
SkASSERT(config == SkBitmap::kARGB_8888_Config);
- SkDevice* bitmap_device = BitmapPlatformDevice::CreateAndClear(width, height,
- isOpaque);
- return bitmap_device;
+ return BitmapPlatformDevice::CreateAndClear(width, height, isOpaque);
}
+// PlatformCanvas impl
+
+SkCanvas* CreatePlatformCanvas(int width,
+ int height,
+ bool is_opaque,
+ HANDLE shared_section,
+ OnFailureType failureType) {
+ SkDevice* dev = BitmapPlatformDevice::Create(width,
+ height,
+ is_opaque,
+ shared_section);
+ return CreateCanvas(dev, failureType);
+}
+
// Port of PlatformBitmap to win
PlatformBitmap::~PlatformBitmap() {
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698