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

Unified Diff: src/lazy/SkLazyPixelRef.h

Issue 28493003: cache SkImage::Info calculation in lazypixelref (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/lazy/SkLazyPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkLazyPixelRef.h
diff --git a/src/lazy/SkLazyPixelRef.h b/src/lazy/SkLazyPixelRef.h
index c51675dd5f301e648e20db0daa40db3a1d7faae6..8f7a751e953693efd0b81cc9e0bafd24dba6154c 100644
--- a/src/lazy/SkLazyPixelRef.h
+++ b/src/lazy/SkLazyPixelRef.h
@@ -71,12 +71,16 @@ private:
SkImageCache* fImageCache;
intptr_t fCacheId;
size_t fRowBytes;
+ SkImage::Info fLazilyCachedInfo;
#if LAZY_CACHE_STATS
static int32_t gCacheHits;
static int32_t gCacheMisses;
#endif
+ // lazily initialized our cached info. Returns NULL on failure.
+ const SkImage::Info* getCachedInfo();
+
typedef SkPixelRef INHERITED;
};
« no previous file with comments | « no previous file | src/lazy/SkLazyPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698