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

Unified Diff: skia/ext/bitmap_platform_device_mac.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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.h ('k') | skia/ext/bitmap_platform_device_skia.h » ('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 53569c8b7c0013cbd64b283d98906dc5f8a2e18b..ff7c2ade1283d3e767a95892316aa2ce2a20d431 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -200,37 +200,6 @@ void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
SetMatrixClip(transform, region);
}
-void BitmapPlatformDevice::DrawToNativeContext(CGContextRef context, int x,
- int y, const CGRect* src_rect) {
- bool created_dc = false;
- if (!bitmap_context_) {
- created_dc = true;
- GetBitmapContext();
- }
-
- // this should not make a copy of the bits, since we're not doing
- // anything to trigger copy on write
- CGImageRef image = CGBitmapContextCreateImage(bitmap_context_);
- CGRect bounds;
- bounds.origin.x = x;
- bounds.origin.y = y;
- if (src_rect) {
- bounds.size.width = src_rect->size.width;
- bounds.size.height = src_rect->size.height;
- CGImageRef sub_image = CGImageCreateWithImageInRect(image, *src_rect);
- CGContextDrawImage(context, bounds, sub_image);
- CGImageRelease(sub_image);
- } else {
- bounds.size.width = width();
- bounds.size.height = height();
- CGContextDrawImage(context, bounds, image);
- }
- CGImageRelease(image);
-
- if (created_dc)
- ReleaseBitmapContext();
-}
-
SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
const CreateInfo& cinfo) {
const SkImageInfo& info = cinfo.fInfo;
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.h ('k') | skia/ext/bitmap_platform_device_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698