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

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..a1f054e966f344cc17ce5cc2f048203c3cc487dc 100644
--- a/src/lazy/SkLazyPixelRef.h
+++ b/src/lazy/SkLazyPixelRef.h
@@ -65,12 +65,16 @@ protected:
virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE;
private:
+ // lazily initialized our cached info. Returns NULL on failure.
+ const SkImage::Info* getCachedInfo();
scroggo 2013/10/21 18:49:24 style nit: other fields before methods.
+
bool fErrorInDecoding;
SkData* fData;
SkBitmapFactory::DecodeProc fDecodeProc;
SkImageCache* fImageCache;
intptr_t fCacheId;
size_t fRowBytes;
+ SkImage::Info fLazilyCachedInfo;
#if LAZY_CACHE_STATS
static int32_t gCacheHits;
« 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