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 SkLazyPixelRef_DEFINED | 8 #ifndef SkLazyPixelRef_DEFINED |
9 #define SkLazyPixelRef_DEFINED | 9 #define SkLazyPixelRef_DEFINED |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // the encoded data and write that instead. | 54 // the encoded data and write that instead. |
55 // Future implementations of SkFlattenableWriteBuffer will need to special c
ase for | 55 // Future implementations of SkFlattenableWriteBuffer will need to special c
ase for |
56 // onRefEncodedData as well. | 56 // onRefEncodedData as well. |
57 SK_DECLARE_UNFLATTENABLE_OBJECT() | 57 SK_DECLARE_UNFLATTENABLE_OBJECT() |
58 | 58 |
59 protected: | 59 protected: |
60 virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE; | 60 virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE; |
61 virtual void onUnlockPixels() SK_OVERRIDE; | 61 virtual void onUnlockPixels() SK_OVERRIDE; |
62 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } | 62 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } |
63 virtual SkData* onRefEncodedData() SK_OVERRIDE; | 63 virtual SkData* onRefEncodedData() SK_OVERRIDE; |
| 64 virtual bool onImplementsDecodeInto() SK_OVERRIDE; |
| 65 virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE; |
64 | 66 |
65 private: | 67 private: |
66 bool fErrorInDecoding; | 68 bool fErrorInDecoding; |
67 SkData* fData; | 69 SkData* fData; |
68 SkBitmapFactory::DecodeProc fDecodeProc; | 70 SkBitmapFactory::DecodeProc fDecodeProc; |
69 SkImageCache* fImageCache; | 71 SkImageCache* fImageCache; |
70 intptr_t fCacheId; | 72 intptr_t fCacheId; |
71 size_t fRowBytes; | 73 size_t fRowBytes; |
72 | 74 |
73 #if LAZY_CACHE_STATS | 75 #if LAZY_CACHE_STATS |
74 static int32_t gCacheHits; | 76 static int32_t gCacheHits; |
75 static int32_t gCacheMisses; | 77 static int32_t gCacheMisses; |
76 #endif | 78 #endif |
77 | 79 |
78 typedef SkPixelRef INHERITED; | 80 typedef SkPixelRef INHERITED; |
79 }; | 81 }; |
80 | 82 |
81 #endif // SkLazyPixelRef_DEFINED | 83 #endif // SkLazyPixelRef_DEFINED |
OLD | NEW |