| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef SkImageCacherator_DEFINED | 8 #ifndef SkImageCacherator_DEFINED |
| 9 #define SkImageCacherator_DEFINED | 9 #define SkImageCacherator_DEFINED |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 uint32_t uniqueID() const { return fUniqueID; } | 27 uint32_t uniqueID() const { return fUniqueID; } |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * On success (true), bitmap will point to the pixels for this generator. I
f this returns | 30 * On success (true), bitmap will point to the pixels for this generator. I
f this returns |
| 31 * false, the bitmap will be reset to empty. | 31 * false, the bitmap will be reset to empty. |
| 32 */ | 32 */ |
| 33 bool lockAsBitmap(SkBitmap*); | 33 bool lockAsBitmap(SkBitmap*); |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Returns a ref() on the texture produced by this generator. The caller mu
st call unref() | 36 * Returns a ref() on the texture produced by this generator. The caller mu
st call unref() |
| 37 * when it is done. Will return NULL on failure. | 37 * when it is done. Will return nullptr on failure. |
| 38 * | 38 * |
| 39 * The caller is responsible for calling texture->unref() when they are don
e. | 39 * The caller is responsible for calling texture->unref() when they are don
e. |
| 40 */ | 40 */ |
| 41 GrTexture* lockAsTexture(GrContext*, SkImageUsageType); | 41 GrTexture* lockAsTexture(GrContext*, SkImageUsageType); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * If the underlying src naturally is represented by an encoded blob (in Sk
Data), this returns | 44 * If the underlying src naturally is represented by an encoded blob (in Sk
Data), this returns |
| 45 * a ref to that data. If not, it returns null. | 45 * a ref to that data. If not, it returns null. |
| 46 */ | 46 */ |
| 47 SkData* refEncoded(); | 47 SkData* refEncoded(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 | 67 |
| 68 SkMutex fMutexForGenerator; | 68 SkMutex fMutexForGenerator; |
| 69 SkAutoTDelete<SkImageGenerator> fNotThreadSafeGenerator; | 69 SkAutoTDelete<SkImageGenerator> fNotThreadSafeGenerator; |
| 70 | 70 |
| 71 const SkImageInfo fInfo; | 71 const SkImageInfo fInfo; |
| 72 const SkIPoint fOrigin; | 72 const SkIPoint fOrigin; |
| 73 const uint32_t fUniqueID; | 73 const uint32_t fUniqueID; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif | 76 #endif |
| OLD | NEW |