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

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

Issue 472153002: Remove unused SkGlyphCache::VisitAllCaches. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 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 SkGlyphCache_DEFINED 10 #ifndef SkGlyphCache_DEFINED
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 deleted. 114 deleted.
115 */ 115 */
116 116
117 //! If the proc is found, return true and set *dataPtr to its data 117 //! If the proc is found, return true and set *dataPtr to its data
118 bool getAuxProcData(void (*auxProc)(void*), void** dataPtr) const; 118 bool getAuxProcData(void (*auxProc)(void*), void** dataPtr) const;
119 //! Add a proc/data pair to the glyphcache. proc should be non-null 119 //! Add a proc/data pair to the glyphcache. proc should be non-null
120 void setAuxProc(void (*auxProc)(void*), void* auxData); 120 void setAuxProc(void (*auxProc)(void*), void* auxData);
121 121
122 SkScalerContext* getScalerContext() const { return fScalerContext; } 122 SkScalerContext* getScalerContext() const { return fScalerContext; }
123 123
124 /** Call proc on all cache entries, stopping early if proc returns true.
125 The proc should not create or delete caches, since it could produce
126 deadlock.
127 */
128 static void VisitAllCaches(bool (*proc)(SkGlyphCache*, void*), void* ctx);
129
130 /** Find a matching cache entry, and call proc() with it. If none is found 124 /** Find a matching cache entry, and call proc() with it. If none is found
131 create a new one. If the proc() returns true, detach the cache and 125 create a new one. If the proc() returns true, detach the cache and
132 return it, otherwise leave it and return NULL. 126 return it, otherwise leave it and return NULL.
133 */ 127 */
134 static SkGlyphCache* VisitCache(SkTypeface*, const SkDescriptor* desc, 128 static SkGlyphCache* VisitCache(SkTypeface*, const SkDescriptor* desc,
135 bool (*proc)(const SkGlyphCache*, void*), 129 bool (*proc)(const SkGlyphCache*, void*),
136 void* context); 130 void* context);
137 131
138 /** Given a strike that was returned by either VisitCache() or DetachCache() 132 /** Given a strike that was returned by either VisitCache() or DetachCache()
139 add it back into the global cache list (after which the caller should 133 add it back into the global cache list (after which the caller should
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 const SkMatrix* matrix) { 294 const SkMatrix* matrix) {
301 fCache = paint.detachCache(deviceProperties, matrix, true); 295 fCache = paint.detachCache(deviceProperties, matrix, true);
302 } 296 }
303 297
304 private: 298 private:
305 SkAutoGlyphCacheNoGamma() : SkAutoGlyphCacheBase() {} 299 SkAutoGlyphCacheNoGamma() : SkAutoGlyphCacheBase() {}
306 }; 300 };
307 #define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamm a) 301 #define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamm a)
308 302
309 #endif 303 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698