| 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 #ifndef SkImage_DEFINED | 8 #ifndef SkImage_DEFINED |
| 9 #define SkImage_DEFINED | 9 #define SkImage_DEFINED |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 /** | 67 /** |
| 68 * Create a new image from the specified descriptor. Note - the caller is r
esponsible for | 68 * Create a new image from the specified descriptor. Note - the caller is r
esponsible for |
| 69 * managing the lifetime of the underlying platform texture. | 69 * managing the lifetime of the underlying platform texture. |
| 70 * | 70 * |
| 71 * Will return NULL if the specified descriptor is unsupported. | 71 * Will return NULL if the specified descriptor is unsupported. |
| 72 */ | 72 */ |
| 73 static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&, | 73 static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&, |
| 74 SkAlphaType = kPremul_SkAlphaType); | 74 SkAlphaType = kPremul_SkAlphaType); |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * Create a new image from the specified descriptor. Note - Skia will delet
e or recycle the |
| 78 * texture when the image is released. |
| 79 * |
| 80 * Will return NULL if the specified descriptor is unsupported. |
| 81 */ |
| 82 static SkImage* NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc
&, |
| 83 SkAlphaType = kPremul_SkAlphaType); |
| 84 |
| 85 /** |
| 77 * Create a new image by copying the pixels from the specified descriptor.
No reference is | 86 * Create a new image by copying the pixels from the specified descriptor.
No reference is |
| 78 * kept to the original platform texture. | 87 * kept to the original platform texture. |
| 79 * | 88 * |
| 80 * Will return NULL if the specified descriptor is unsupported. | 89 * Will return NULL if the specified descriptor is unsupported. |
| 81 */ | 90 */ |
| 82 static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, | 91 static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, |
| 83 SkAlphaType = kPremul_SkAlphaType); | 92 SkAlphaType = kPremul_SkAlphaType); |
| 84 | 93 |
| 85 /** | 94 /** |
| 86 * Create a new image by copying the pixels from the specified y, u, v text
ures. The data | 95 * Create a new image by copying the pixels from the specified y, u, v text
ures. The data |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 const int fWidth; | 213 const int fWidth; |
| 205 const int fHeight; | 214 const int fHeight; |
| 206 const uint32_t fUniqueID; | 215 const uint32_t fUniqueID; |
| 207 | 216 |
| 208 static uint32_t NextUniqueID(); | 217 static uint32_t NextUniqueID(); |
| 209 | 218 |
| 210 typedef SkRefCnt INHERITED; | 219 typedef SkRefCnt INHERITED; |
| 211 }; | 220 }; |
| 212 | 221 |
| 213 #endif | 222 #endif |
| OLD | NEW |