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

Side by Side Diff: include/lazy/SkBitmapFactory.h

Issue 18461007: Fix two leaks & improve leak tracking (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | « include/gpu/GrOvalRenderer.h ('k') | include/lazy/SkImageCache.h » ('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 SkBitmapFactory_DEFINED 8 #ifndef SkBitmapFactory_DEFINED
9 #define SkBitmapFactory_DEFINED 9 #define SkBitmapFactory_DEFINED
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * @return bool Whether or not a pixel ref was successfully installed. 65 * @return bool Whether or not a pixel ref was successfully installed.
66 */ 66 */
67 bool installPixelRef(SkData*, SkBitmap*); 67 bool installPixelRef(SkData*, SkBitmap*);
68 68
69 /** 69 /**
70 * An object for selecting an SkImageCache to use based on an SkImage::Info . 70 * An object for selecting an SkImageCache to use based on an SkImage::Info .
71 */ 71 */
72 class CacheSelector : public SkRefCnt { 72 class CacheSelector : public SkRefCnt {
73 73
74 public: 74 public:
75 SK_DECLARE_INST_COUNT(CacheSelector)
75 /** 76 /**
76 * Return an SkImageCache to use based on the provided SkImage::Info. I f the caller decides 77 * Return an SkImageCache to use based on the provided SkImage::Info. I f the caller decides
77 * to hang on to the result, it will call ref, so the implementation sh ould not add a ref 78 * to hang on to the result, it will call ref, so the implementation sh ould not add a ref
78 * as a result of this call. 79 * as a result of this call.
79 */ 80 */
80 virtual SkImageCache* selectCache(const SkImage::Info&) = 0; 81 virtual SkImageCache* selectCache(const SkImage::Info&) = 0;
82
83 private:
84 typedef SkRefCnt INHERITED;
81 }; 85 };
82 86
83 /** 87 /**
84 * Set the function to be used to select which SkImageCache to use. Mutuall y exclusive with 88 * Set the function to be used to select which SkImageCache to use. Mutuall y exclusive with
85 * fImageCache. 89 * fImageCache.
86 */ 90 */
87 void setCacheSelector(CacheSelector*); 91 void setCacheSelector(CacheSelector*);
88 92
89 private: 93 private:
90 DecodeProc fDecodeProc; 94 DecodeProc fDecodeProc;
91 SkImageCache* fImageCache; 95 SkImageCache* fImageCache;
92 CacheSelector* fCacheSelector; 96 CacheSelector* fCacheSelector;
93 }; 97 };
94 98
95 #endif // SkBitmapFactory_DEFINED 99 #endif // SkBitmapFactory_DEFINED
OLDNEW
« no previous file with comments | « include/gpu/GrOvalRenderer.h ('k') | include/lazy/SkImageCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698