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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 static SkImage* NewFromTexture(GrContext* ctx, const GrBackendTextureDesc& d
e, SkAlphaType at) { | 100 static SkImage* NewFromTexture(GrContext* ctx, const GrBackendTextureDesc& d
e, SkAlphaType at) { |
101 return NewFromTexture(ctx, de, at, NULL, NULL); | 101 return NewFromTexture(ctx, de, at, NULL, NULL); |
102 } | 102 } |
103 | 103 |
104 typedef void (*TextureReleaseProc)(ReleaseContext); | 104 typedef void (*TextureReleaseProc)(ReleaseContext); |
105 | 105 |
106 /** | 106 /** |
107 * Create a new image from the specified descriptor. The underlying platfor
m texture must stay | 107 * Create a new image from the specified descriptor. The underlying platfor
m texture must stay |
108 * valid and unaltered until the specified release-proc is invoked, indicat
ing that Skia | 108 * valid and unaltered until the specified release-proc is invoked, indicat
ing that Skia |
109 * nolonger is holding a reference to it. | 109 * no longer is holding a reference to it. |
110 * | 110 * |
111 * Will return NULL if the specified descriptor is unsupported. | 111 * Will return NULL if the specified descriptor is unsupported. |
112 */ | 112 */ |
113 static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&, SkAl
phaType, | 113 static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&, SkAl
phaType, |
114 TextureReleaseProc, ReleaseContext); | 114 TextureReleaseProc, ReleaseContext); |
115 | 115 |
116 /** | 116 /** |
117 * Create a new image from the specified descriptor. Note - Skia will delet
e or recycle the | 117 * Create a new image from the specified descriptor. Note - Skia will delet
e or recycle the |
118 * texture when the image is released. | 118 * texture when the image is released. |
119 * | 119 * |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 const int fWidth; | 296 const int fWidth; |
297 const int fHeight; | 297 const int fHeight; |
298 const uint32_t fUniqueID; | 298 const uint32_t fUniqueID; |
299 | 299 |
300 static uint32_t NextUniqueID(); | 300 static uint32_t NextUniqueID(); |
301 | 301 |
302 typedef SkRefCnt INHERITED; | 302 typedef SkRefCnt INHERITED; |
303 }; | 303 }; |
304 | 304 |
305 #endif | 305 #endif |
OLD | NEW |