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

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

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

Powered by Google App Engine
This is Rietveld 408576698