OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |