| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 void unlock() { | 199 void unlock() { |
| 200 if (fUnlockProc) { | 200 if (fUnlockProc) { |
| 201 fUnlockProc(fUnlockContext); | 201 fUnlockProc(fUnlockContext); |
| 202 fUnlockProc = NULL; // can't unlock twice! | 202 fUnlockProc = NULL; // can't unlock twice! |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 bool requestLock(const LockRequest&, LockResult*); | 207 bool requestLock(const LockRequest&, LockResult*); |
| 208 | 208 |
| 209 /** Are we really wrapping a texture instead of a bitmap? | |
| 210 */ | |
| 211 virtual GrTexture* getTexture() { return NULL; } | |
| 212 | |
| 213 /** | 209 /** |
| 214 * If this can efficiently return YUV data, this should return true. | 210 * If this can efficiently return YUV data, this should return true. |
| 215 * Otherwise this returns false and does not modify any of the parameters. | 211 * Otherwise this returns false and does not modify any of the parameters. |
| 216 * | 212 * |
| 217 * @param sizeInfo Output parameter indicating the sizes and required | 213 * @param sizeInfo Output parameter indicating the sizes and required |
| 218 * allocation widths of the Y, U, and V planes. | 214 * allocation widths of the Y, U, and V planes. |
| 219 * @param colorSpace Output parameter. | 215 * @param colorSpace Output parameter. |
| 220 */ | 216 */ |
| 221 bool queryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const { | 217 bool queryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const { |
| 222 return this->onQueryYUV8(sizeInfo, colorSpace); | 218 return this->onQueryYUV8(sizeInfo, colorSpace); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 /** | 396 /** |
| 401 * Allocate a new pixelref matching the specified ImageInfo, allocating | 397 * Allocate a new pixelref matching the specified ImageInfo, allocating |
| 402 * the memory for the pixels. If the ImageInfo requires a ColorTable, | 398 * the memory for the pixels. If the ImageInfo requires a ColorTable, |
| 403 * the pixelref will ref() the colortable. | 399 * the pixelref will ref() the colortable. |
| 404 * On failure return NULL. | 400 * On failure return NULL. |
| 405 */ | 401 */ |
| 406 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable
*) = 0; | 402 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable
*) = 0; |
| 407 }; | 403 }; |
| 408 | 404 |
| 409 #endif | 405 #endif |
| OLD | NEW |