Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: include/core/SkImage.h

Issue 1305453007: SkImage method for detecting lazy decoding (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | include/core/SkPixelRef.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698