| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
| 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 #ifndef SkPixelRef_DEFINED | 8 #ifndef SkPixelRef_DEFINED |
| 9 #define SkPixelRef_DEFINED | 9 #define SkPixelRef_DEFINED |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 | 217 |
| 218 /** Are we really wrapping a texture instead of a bitmap? | 218 /** Are we really wrapping a texture instead of a bitmap? |
| 219 */ | 219 */ |
| 220 virtual GrTexture* getTexture() { return NULL; } | 220 virtual GrTexture* getTexture() { return NULL; } |
| 221 | 221 |
| 222 bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL); | 222 bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL); |
| 223 | 223 |
| 224 /** | 224 /** |
| 225 * Makes a deep copy of this PixelRef, respecting the requested config. | 225 * Makes a deep copy of this PixelRef, respecting the requested config. |
| 226 * @param config Desired config. | |
| 227 * @param subset Subset of this PixelRef to copy. Must be fully contained w
ithin the bounds of | 226 * @param subset Subset of this PixelRef to copy. Must be fully contained w
ithin the bounds of |
| 228 * of this PixelRef. | 227 * of this PixelRef. |
| 229 * @return A new SkPixelRef, or NULL if either there is an error (e.g. the
destination could | 228 * @return A new SkPixelRef, or NULL if either there is an error (e.g. the
destination could |
| 230 * not be created with the given config), or this PixelRef does not
support deep | 229 * not be created with the given config), or this PixelRef does not
support deep |
| 231 * copies. | 230 * copies. |
| 232 */ | 231 */ |
| 233 virtual SkPixelRef* deepCopy(SkBitmap::Config config, const SkIRect* subset
= NULL) { | 232 virtual SkPixelRef* deepCopy(const SkIRect* subset = NULL) { |
| 234 return NULL; | 233 return NULL; |
| 235 } | 234 } |
| 236 | 235 |
| 237 #ifdef SK_BUILD_FOR_ANDROID | 236 #ifdef SK_BUILD_FOR_ANDROID |
| 238 /** | 237 /** |
| 239 * Acquire a "global" ref on this object. | 238 * Acquire a "global" ref on this object. |
| 240 * The default implementation just calls ref(), but subclasses can override | 239 * The default implementation just calls ref(), but subclasses can override |
| 241 * this method to implement additional behavior. | 240 * this method to implement additional behavior. |
| 242 */ | 241 */ |
| 243 virtual void globalRef(void* data=NULL); | 242 virtual void globalRef(void* data=NULL); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 /** | 370 /** |
| 372 * Allocate a new pixelref matching the specified ImageInfo, allocating | 371 * Allocate a new pixelref matching the specified ImageInfo, allocating |
| 373 * the memory for the pixels. If the ImageInfo requires a ColorTable, | 372 * the memory for the pixels. If the ImageInfo requires a ColorTable, |
| 374 * the pixelref will ref() the colortable. | 373 * the pixelref will ref() the colortable. |
| 375 * On failure return NULL. | 374 * On failure return NULL. |
| 376 */ | 375 */ |
| 377 virtual SkPixelRef* create(const SkImageInfo&, SkColorTable*) = 0; | 376 virtual SkPixelRef* create(const SkImageInfo&, SkColorTable*) = 0; |
| 378 }; | 377 }; |
| 379 | 378 |
| 380 #endif | 379 #endif |
| OLD | NEW |