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

Unified Diff: skia/ext/bitmap_platform_device_cairo.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
Index: skia/ext/bitmap_platform_device_cairo.cc
diff --git a/skia/ext/bitmap_platform_device_cairo.cc b/skia/ext/bitmap_platform_device_cairo.cc
index 246984a8a41ee171c1ff1db2465acf220dacc709..93787332f12f9f03a7ca2867f223b0070ee9bbe3 100644
--- a/skia/ext/bitmap_platform_device_cairo.cc
+++ b/skia/ext/bitmap_platform_device_cairo.cc
@@ -200,26 +200,4 @@ SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque,
return CreateCanvas(dev, failureType);
}
-// Port of PlatformBitmap to linux
-PlatformBitmap::~PlatformBitmap() {
- cairo_destroy(surface_);
-}
-
-bool PlatformBitmap::Allocate(int width, int height, bool is_opaque) {
- // The SkBitmap allocates and owns the bitmap memory; PlatformBitmap owns the
- // cairo drawing context tied to the bitmap. The SkBitmap's pixelRef can
- // outlive the PlatformBitmap if additional copies are made.
- int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
-
- cairo_surface_t* surf = cairo_image_surface_create(
- CAIRO_FORMAT_ARGB32,
- width,
- height);
- if (cairo_surface_status(surf) != CAIRO_STATUS_SUCCESS) {
- cairo_surface_destroy(surf);
- return false;
- }
- return InstallCairoSurfacePixels(&bitmap_, surf, is_opaque);
-}
-
} // namespace skia
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device_unittest.cc ('k') | skia/ext/bitmap_platform_device_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698