| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkImage_Base.h" | 8 #include "SkImage_Base.h" |
| 9 #include "SkImagePriv.h" | 9 #include "SkImagePriv.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 return NULL; | 210 return NULL; |
| 211 } | 211 } |
| 212 return SkNEW_ARGS(SkImage_Raster, (bitmap)); | 212 return SkNEW_ARGS(SkImage_Raster, (bitmap)); |
| 213 } | 213 } |
| 214 | 214 |
| 215 SkImage* SkNewImageFromPixelRef(const SkImageInfo& info, SkPixelRef* pr, | 215 SkImage* SkNewImageFromPixelRef(const SkImageInfo& info, SkPixelRef* pr, |
| 216 size_t rowBytes) { | 216 size_t rowBytes) { |
| 217 return SkNEW_ARGS(SkImage_Raster, (info, pr, rowBytes)); | 217 return SkNEW_ARGS(SkImage_Raster, (info, pr, rowBytes)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 SkPixelRef* SkBitmapImageGetPixelRef(SkImage* image) { | 220 const SkPixelRef* SkBitmapImageGetPixelRef(const SkImage* image) { |
| 221 return ((SkImage_Raster*)image)->getPixelRef(); | 221 return ((const SkImage_Raster*)image)->getPixelRef(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 bool SkImage_Raster::isOpaque() const { | 224 bool SkImage_Raster::isOpaque() const { |
| 225 return fBitmap.isOpaque(); | 225 return fBitmap.isOpaque(); |
| 226 } | 226 } |
| OLD | NEW |