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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 * Attempt to create a bitmap with the same pixels as the image. The result
will always be | 281 * Attempt to create a bitmap with the same pixels as the image. The result
will always be |
282 * a raster-backed bitmap (texture-backed bitmaps are DEPRECATED, and not s
upported here). | 282 * a raster-backed bitmap (texture-backed bitmaps are DEPRECATED, and not s
upported here). |
283 * | 283 * |
284 * If the mode is kRO (read-only), the resulting bitmap will be marked as i
mmutable. | 284 * If the mode is kRO (read-only), the resulting bitmap will be marked as i
mmutable. |
285 * | 285 * |
286 * On succcess, returns true. On failure, returns false and the bitmap para
meter will be reset | 286 * On succcess, returns true. On failure, returns false and the bitmap para
meter will be reset |
287 * to empty. | 287 * to empty. |
288 */ | 288 */ |
289 bool asLegacyBitmap(SkBitmap*, LegacyBitmapMode) const; | 289 bool asLegacyBitmap(SkBitmap*, LegacyBitmapMode) const; |
290 | 290 |
| 291 /** |
| 292 * Returns true if the image is backed by an image-generator or other src t
hat creates |
| 293 * (and caches) its pixels / texture on-demand. |
| 294 */ |
| 295 bool isLazyGenerated() const; |
| 296 |
291 protected: | 297 protected: |
292 SkImage(int width, int height, uint32_t uniqueID); | 298 SkImage(int width, int height, uint32_t uniqueID); |
293 | 299 |
294 private: | 300 private: |
295 const int fWidth; | 301 const int fWidth; |
296 const int fHeight; | 302 const int fHeight; |
297 const uint32_t fUniqueID; | 303 const uint32_t fUniqueID; |
298 | 304 |
299 typedef SkRefCnt INHERITED; | 305 typedef SkRefCnt INHERITED; |
300 }; | 306 }; |
301 | 307 |
302 #endif | 308 #endif |
OLD | NEW |