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

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

Issue 1986253002: Rename SkDescriptor::equals to SkDescriptor::operator== (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « src/core/SkDescriptor.h ('k') | src/gpu/GrPathRendering.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #include "SkGlyphCache.h" 8 #include "SkGlyphCache.h"
9 #include "SkGlyphCache_Globals.h" 9 #include "SkGlyphCache_Globals.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 SkGlyphCache_Globals& globals = get_globals(); 523 SkGlyphCache_Globals& globals = get_globals();
524 SkGlyphCache* cache; 524 SkGlyphCache* cache;
525 525
526 { 526 {
527 Exclusive ac(globals.fLock); 527 Exclusive ac(globals.fLock);
528 528
529 globals.validate(); 529 globals.validate();
530 530
531 for (cache = globals.internalGetHead(); cache != nullptr; cache = cache- >fNext) { 531 for (cache = globals.internalGetHead(); cache != nullptr; cache = cache- >fNext) {
532 if (cache->fDesc->equals(*desc)) { 532 if (*cache->fDesc == *desc) {
533 globals.internalDetachCache(cache); 533 globals.internalDetachCache(cache);
534 if (!proc(cache, context)) { 534 if (!proc(cache, context)) {
535 globals.internalAttachCacheToHead(cache); 535 globals.internalAttachCacheToHead(cache);
536 cache = nullptr; 536 cache = nullptr;
537 } 537 }
538 return cache; 538 return cache;
539 } 539 }
540 } 540 }
541 } 541 }
542 542
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 } 817 }
818 818
819 void SkGraphics::PurgeFontCache() { 819 void SkGraphics::PurgeFontCache() {
820 get_globals().purgeAll(); 820 get_globals().purgeAll();
821 SkTypefaceCache::PurgeAll(); 821 SkTypefaceCache::PurgeAll();
822 } 822 }
823 823
824 // TODO(herb): clean up TLS apis. 824 // TODO(herb): clean up TLS apis.
825 size_t SkGraphics::GetTLSFontCacheLimit() { return 0; } 825 size_t SkGraphics::GetTLSFontCacheLimit() { return 0; }
826 void SkGraphics::SetTLSFontCacheLimit(size_t bytes) { } 826 void SkGraphics::SetTLSFontCacheLimit(size_t bytes) { }
OLDNEW
« no previous file with comments | « src/core/SkDescriptor.h ('k') | src/gpu/GrPathRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698