OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkImageRef_GlobalPool_DEFINED | 10 #ifndef SkImageRef_GlobalPool_DEFINED |
11 #define SkImageRef_GlobalPool_DEFINED | 11 #define SkImageRef_GlobalPool_DEFINED |
12 | 12 |
13 #include "SkImageRef.h" | 13 #include "SkImageRef.h" |
14 | 14 |
15 class SkImageRef_GlobalPool : public SkImageRef { | 15 class SkImageRef_GlobalPool : public SkImageRef { |
| 16 typedef SkImageRef INHERITED; |
| 17 |
16 public: | 18 public: |
17 // if pool is null, use the global pool | 19 // if pool is null, use the global pool |
18 SkImageRef_GlobalPool(SkStreamRewindable*, SkBitmap::Config, | 20 SkImageRef_GlobalPool(SkStreamRewindable*, SkBitmap::Config, |
19 int sampleSize = 1); | 21 int sampleSize = 1); |
20 virtual ~SkImageRef_GlobalPool(); | 22 virtual ~SkImageRef_GlobalPool(); |
21 | 23 |
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_GlobalPool) | 24 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_GlobalPool) |
23 | 25 |
24 // API to control the global pool | 26 // API to control the global pool |
25 | 27 |
(...skipping 21 matching lines...) Expand all Loading... |
47 static void DumpPool(); | 49 static void DumpPool(); |
48 | 50 |
49 protected: | 51 protected: |
50 virtual bool onDecode(SkImageDecoder* codec, SkStreamRewindable* stream, | 52 virtual bool onDecode(SkImageDecoder* codec, SkStreamRewindable* stream, |
51 SkBitmap* bitmap, SkBitmap::Config config, | 53 SkBitmap* bitmap, SkBitmap::Config config, |
52 SkImageDecoder::Mode mode); | 54 SkImageDecoder::Mode mode); |
53 | 55 |
54 virtual void onUnlockPixels(); | 56 virtual void onUnlockPixels(); |
55 | 57 |
56 SkImageRef_GlobalPool(SkFlattenableReadBuffer&); | 58 SkImageRef_GlobalPool(SkFlattenableReadBuffer&); |
57 | |
58 private: | |
59 typedef SkImageRef INHERITED; | |
60 }; | 59 }; |
61 | 60 |
62 #endif | 61 #endif |
OLD | NEW |