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

Side by Side Diff: src/core/SkResourceCache.h

Issue 670063004: Add SkMaskCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add namespace for key in MaskCache Created 6 years, 2 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
OLDNEW
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 SkResourceCache_DEFINED 8 #ifndef SkResourceCache_DEFINED
9 #define SkResourceCache_DEFINED 9 #define SkResourceCache_DEFINED
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 * Returns the DiscardableFactory used by the global cache, or NULL. 130 * Returns the DiscardableFactory used by the global cache, or NULL.
131 */ 131 */
132 static DiscardableFactory GetDiscardableFactory(); 132 static DiscardableFactory GetDiscardableFactory();
133 133
134 /** 134 /**
135 * Use this allocator for bitmaps, so they can use ashmem when available. 135 * Use this allocator for bitmaps, so they can use ashmem when available.
136 * Returns NULL if the ResourceCache has not been initialized with a Discard ableFactory. 136 * Returns NULL if the ResourceCache has not been initialized with a Discard ableFactory.
137 */ 137 */
138 static SkBitmap::Allocator* GetAllocator(); 138 static SkBitmap::Allocator* GetAllocator();
139 139
140 static SkCachedData* NewCachedData(size_t bytes);
141
140 /** 142 /**
141 * Call SkDebugf() with diagnostic information about the state of the cache 143 * Call SkDebugf() with diagnostic information about the state of the cache
142 */ 144 */
143 static void Dump(); 145 static void Dump();
144 146
145 /////////////////////////////////////////////////////////////////////////// 147 ///////////////////////////////////////////////////////////////////////////
146 148
147 /** 149 /**
148 * Construct the cache to call DiscardableFactory when it 150 * Construct the cache to call DiscardableFactory when it
149 * allocates memory for the pixels. In this mode, the cache has 151 * allocates memory for the pixels. In this mode, the cache has
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 233
232 void init(); // called by constructors 234 void init(); // called by constructors
233 235
234 #ifdef SK_DEBUG 236 #ifdef SK_DEBUG
235 void validate() const; 237 void validate() const;
236 #else 238 #else
237 void validate() const {} 239 void validate() const {}
238 #endif 240 #endif
239 }; 241 };
240 #endif 242 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698