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

Side by Side Diff: include/images/SkImageRef_GlobalPool.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: New serialization method Created 7 years, 3 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
OLDNEW
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(SkStream*, SkBitmap::Config, int sampleSize = 1); 20 SkImageRef_GlobalPool(SkStream*, SkBitmap::Config, int sampleSize = 1);
19 virtual ~SkImageRef_GlobalPool(); 21 virtual ~SkImageRef_GlobalPool();
20 22
21 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_GlobalPool) 23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_GlobalPool)
22 24
23 // API to control the global pool 25 // API to control the global pool
24 26
25 /** Return the amount specified as the budget for the cache (in bytes). 27 /** Return the amount specified as the budget for the cache (in bytes).
(...skipping 20 matching lines...) Expand all
46 static void DumpPool(); 48 static void DumpPool();
47 49
48 protected: 50 protected:
49 virtual bool onDecode(SkImageDecoder* codec, SkStream* stream, 51 virtual bool onDecode(SkImageDecoder* codec, SkStream* stream,
50 SkBitmap* bitmap, SkBitmap::Config config, 52 SkBitmap* bitmap, SkBitmap::Config config,
51 SkImageDecoder::Mode mode); 53 SkImageDecoder::Mode mode);
52 54
53 virtual void onUnlockPixels(); 55 virtual void onUnlockPixels();
54 56
55 SkImageRef_GlobalPool(SkFlattenableReadBuffer&); 57 SkImageRef_GlobalPool(SkFlattenableReadBuffer&);
56
57 private:
58 typedef SkImageRef INHERITED;
59 }; 58 };
60 59
61 #endif 60 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698