OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkCachingPixelRef_DEFINED | 8 #ifndef SkCachingPixelRef_DEFINED |
9 #define SkCachingPixelRef_DEFINED | 9 #define SkCachingPixelRef_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 * Decoding is handled by the pure-virtual functions onDecodeInfo() | 23 * Decoding is handled by the pure-virtual functions onDecodeInfo() |
24 * and onDecodePixels(). Subclasses of this class need only provide | 24 * and onDecodePixels(). Subclasses of this class need only provide |
25 * those two functions. | 25 * those two functions. |
26 */ | 26 */ |
27 class SkCachingPixelRef : public SkPixelRef { | 27 class SkCachingPixelRef : public SkPixelRef { |
28 public: | 28 public: |
29 SkCachingPixelRef(); | 29 SkCachingPixelRef(); |
30 virtual ~SkCachingPixelRef(); | 30 virtual ~SkCachingPixelRef(); |
31 | 31 |
32 protected: | 32 protected: |
33 virtual void* onLockPixels(SkColorTable** colorTable) SK_OVERRIDE; | 33 virtual void* onLockPixels(SkImageInfo*, size_t*, SkColorTable**) SK_OVERRID
E; |
34 virtual void onUnlockPixels() SK_OVERRIDE; | 34 virtual void onUnlockPixels() SK_OVERRIDE; |
35 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } | 35 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } |
36 virtual bool onImplementsDecodeInto() SK_OVERRIDE { return true; } | 36 virtual bool onImplementsDecodeInto() SK_OVERRIDE { return true; } |
37 virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE; | 37 virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE; |
38 | 38 |
39 /** | 39 /** |
40 * Configure the supplied bitmap for this pixelRef, based on | 40 * Configure the supplied bitmap for this pixelRef, based on |
41 * information provided by onDecodeInfo(). Does not set the | 41 * information provided by onDecodeInfo(). Does not set the |
42 * bitmap's pixelRef. */ | 42 * bitmap's pixelRef. */ |
43 bool configure(SkBitmap* bitmap); | 43 bool configure(SkBitmap* bitmap); |
(...skipping 27 matching lines...) Expand all Loading... |
71 | 71 |
72 private: | 72 private: |
73 bool fErrorInDecoding; | 73 bool fErrorInDecoding; |
74 void* fScaledCacheId; | 74 void* fScaledCacheId; |
75 SkImageInfo fInfo; | 75 SkImageInfo fInfo; |
76 | 76 |
77 typedef SkPixelRef INHERITED; | 77 typedef SkPixelRef INHERITED; |
78 }; | 78 }; |
79 | 79 |
80 #endif // SkCachingPixelRef_DEFINED | 80 #endif // SkCachingPixelRef_DEFINED |
OLD | NEW |