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

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

Issue 6588012: roll skia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.h ('k') | skia/ext/bitmap_platform_device_mac_unittest.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <time.h> 7 #include <time.h>
8 8
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 data_->ref(); 211 data_->ref();
212 return *this; 212 return *this;
213 } 213 }
214 214
215 CGContextRef BitmapPlatformDevice::GetBitmapContext() { 215 CGContextRef BitmapPlatformDevice::GetBitmapContext() {
216 data_->LoadConfig(); 216 data_->LoadConfig();
217 return data_->bitmap_context(); 217 return data_->bitmap_context();
218 } 218 }
219 219
220 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, 220 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
221 const SkRegion& region) { 221 const SkRegion& region,
222 const SkClipStack&) {
222 data_->SetMatrixClip(transform, region); 223 data_->SetMatrixClip(transform, region);
223 } 224 }
224 225
225 void BitmapPlatformDevice::DrawToContext(CGContextRef context, int x, int y, 226 void BitmapPlatformDevice::DrawToContext(CGContextRef context, int x, int y,
226 const CGRect* src_rect) { 227 const CGRect* src_rect) {
227 bool created_dc = false; 228 bool created_dc = false;
228 if (!data_->bitmap_context()) { 229 if (!data_->bitmap_context()) {
229 created_dc = true; 230 created_dc = true;
230 GetBitmapContext(); 231 GetBitmapContext();
231 } 232 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 SkAutoLockPixels lock(bitmap); 264 SkAutoLockPixels lock(bitmap);
264 uint32_t* data = bitmap.getAddr32(0, 0); 265 uint32_t* data = bitmap.getAddr32(0, 0);
265 return static_cast<SkColor>(data[x + y * width()]); 266 return static_cast<SkColor>(data[x + y * width()]);
266 } 267 }
267 268
268 void BitmapPlatformDevice::onAccessBitmap(SkBitmap*) { 269 void BitmapPlatformDevice::onAccessBitmap(SkBitmap*) {
269 // Not needed in CoreGraphics 270 // Not needed in CoreGraphics
270 } 271 }
271 272
272 } // namespace skia 273 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.h ('k') | skia/ext/bitmap_platform_device_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698