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

Side by Side Diff: skia/ext/bitmap_platform_device_mac.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "skia/ext/bitmap_platform_device_mac.h" 5 #include "skia/ext/bitmap_platform_device_mac.h"
6 6
7 #import <ApplicationServices/ApplicationServices.h> 7 #import <ApplicationServices/ApplicationServices.h>
8 #include <time.h> 8 #include <time.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 LoadConfig(); 265 LoadConfig();
266 return bitmap_context_; 266 return bitmap_context_;
267 } 267 }
268 268
269 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, 269 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
270 const SkRegion& region, 270 const SkRegion& region,
271 const SkClipStack&) { 271 const SkClipStack&) {
272 SetMatrixClip(transform, region); 272 SetMatrixClip(transform, region);
273 } 273 }
274 274
275 SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice( 275 SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& cinfo,
276 const CreateInfo& cinfo) { 276 const SkPaint*) {
277 const SkImageInfo& info = cinfo.fInfo; 277 const SkImageInfo& info = cinfo.fInfo;
278 const bool do_clear = !info.isOpaque(); 278 const bool do_clear = !info.isOpaque();
279 SkASSERT(info.colorType() == kN32_SkColorType); 279 SkASSERT(info.colorType() == kN32_SkColorType);
280 return Create(NULL, info.width(), info.height(), info.isOpaque(), do_clear); 280 return Create(NULL, info.width(), info.height(), info.isOpaque(), do_clear);
281 } 281 }
282 282
283 // PlatformCanvas impl 283 // PlatformCanvas impl
284 284
285 SkCanvas* CreatePlatformCanvas(CGContextRef ctx, int width, int height, 285 SkCanvas* CreatePlatformCanvas(CGContextRef ctx, int width, int height,
286 bool is_opaque, OnFailureType failureType) { 286 bool is_opaque, OnFailureType failureType) {
(...skipping 26 matching lines...) Expand all
313 313
314 if (!is_opaque) 314 if (!is_opaque)
315 bitmap_.eraseColor(0); 315 bitmap_.eraseColor(0);
316 316
317 surface_ = CGContextForData(bitmap_.getPixels(), bitmap_.width(), 317 surface_ = CGContextForData(bitmap_.getPixels(), bitmap_.width(),
318 bitmap_.height()); 318 bitmap_.height());
319 return true; 319 return true;
320 } 320 }
321 321
322 } // namespace skia 322 } // namespace skia
OLDNEW
« 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