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

Side by Side Diff: src/lazy/SkLazyPixelRef.h

Issue 33573002: Revert "Revert "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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/images/SkImageDecoder.cpp ('k') | src/lazy/SkLazyPixelRef.cpp » ('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 SkLazyPixelRef_DEFINED 8 #ifndef SkLazyPixelRef_DEFINED
9 #define SkLazyPixelRef_DEFINED 9 #define SkLazyPixelRef_DEFINED
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 virtual bool onImplementsDecodeInto() SK_OVERRIDE; 64 virtual bool onImplementsDecodeInto() SK_OVERRIDE;
65 virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE; 65 virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE;
66 66
67 private: 67 private:
68 bool fErrorInDecoding; 68 bool fErrorInDecoding;
69 SkData* fData; 69 SkData* fData;
70 SkBitmapFactory::DecodeProc fDecodeProc; 70 SkBitmapFactory::DecodeProc fDecodeProc;
71 SkImageCache* fImageCache; 71 SkImageCache* fImageCache;
72 intptr_t fCacheId; 72 intptr_t fCacheId;
73 size_t fRowBytes; 73 size_t fRowBytes;
74 SkImage::Info fLazilyCachedInfo;
74 75
75 #if LAZY_CACHE_STATS 76 #if LAZY_CACHE_STATS
76 static int32_t gCacheHits; 77 static int32_t gCacheHits;
77 static int32_t gCacheMisses; 78 static int32_t gCacheMisses;
78 #endif 79 #endif
79 80
81 // lazily initialized our cached info. Returns NULL on failure.
82 const SkImage::Info* getCachedInfo();
83
80 typedef SkPixelRef INHERITED; 84 typedef SkPixelRef INHERITED;
81 }; 85 };
82 86
83 #endif // SkLazyPixelRef_DEFINED 87 #endif // SkLazyPixelRef_DEFINED
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder.cpp ('k') | src/lazy/SkLazyPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698