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

Unified Diff: skia/ext/bitmap_platform_device_mac.cc

Issue 1396613006: Remove skia::PlatformBitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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_cairo.cc ('k') | skia/ext/bitmap_platform_device_skia.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.cc
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 087cf39d7fdfec0bb89681f59f9288ff52f020b3..cc4f3ef8e8932a31ba9255231594ced80b6cf596 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -298,26 +298,4 @@ SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque,
return CreateCanvas(dev, failureType);
}
-// Port of PlatformBitmap to mac
-
-PlatformBitmap::~PlatformBitmap() {
- if (surface_)
- CGContextRelease(surface_);
-}
-
-bool PlatformBitmap::Allocate(int width, int height, bool is_opaque) {
- if (RasterDeviceTooBigToAllocate(width, height))
- return false;
-
- if (!bitmap_.tryAllocN32Pixels(width, height, is_opaque))
- return false;
-
- if (!is_opaque)
- bitmap_.eraseColor(0);
-
- surface_ = CGContextForData(bitmap_.getPixels(), bitmap_.width(),
- bitmap_.height());
- return true;
-}
-
} // namespace skia
« no previous file with comments | « skia/ext/bitmap_platform_device_cairo.cc ('k') | skia/ext/bitmap_platform_device_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698