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

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

Issue 2322753002: GN: default to -O1 (Closed)
Patch Set: warning Created 4 years, 3 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 | « gn/BUILD.gn ('k') | no next file » | 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 const SkDescriptor* desc, 538 const SkDescriptor* desc,
539 bool (*proc)(const SkGlyphCache*, void*), 539 bool (*proc)(const SkGlyphCache*, void*),
540 void* context) { 540 void* context) {
541 if (!typeface) { 541 if (!typeface) {
542 typeface = SkTypeface::GetDefaultTypeface(); 542 typeface = SkTypeface::GetDefaultTypeface();
543 } 543 }
544 SkASSERT(desc); 544 SkASSERT(desc);
545 545
546 // Precondition: the typeface id must be the fFontID in the descriptor 546 // Precondition: the typeface id must be the fFontID in the descriptor
547 SkDEBUGCODE( 547 SkDEBUGCODE(
548 uint32_t length; 548 uint32_t length = 0;
549 const SkScalerContext::Rec* rec = static_cast<const SkScalerContext::Rec *>( 549 const SkScalerContext::Rec* rec = static_cast<const SkScalerContext::Rec *>(
550 desc->findEntry(kRec_SkDescriptorTag, &length)); 550 desc->findEntry(kRec_SkDescriptorTag, &length));
551 SkASSERT(rec); 551 SkASSERT(rec);
552 SkASSERT(length == sizeof(*rec)); 552 SkASSERT(length == sizeof(*rec));
553 SkASSERT(typeface->uniqueID() == rec->fFontID); 553 SkASSERT(typeface->uniqueID() == rec->fFontID);
554 ) 554 )
555 555
556 SkGlyphCache_Globals& globals = get_globals(); 556 SkGlyphCache_Globals& globals = get_globals();
557 SkGlyphCache* cache; 557 SkGlyphCache* cache;
558 558
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } 850 }
851 851
852 void SkGraphics::PurgeFontCache() { 852 void SkGraphics::PurgeFontCache() {
853 get_globals().purgeAll(); 853 get_globals().purgeAll();
854 SkTypefaceCache::PurgeAll(); 854 SkTypefaceCache::PurgeAll();
855 } 855 }
856 856
857 // TODO(herb): clean up TLS apis. 857 // TODO(herb): clean up TLS apis.
858 size_t SkGraphics::GetTLSFontCacheLimit() { return 0; } 858 size_t SkGraphics::GetTLSFontCacheLimit() { return 0; }
859 void SkGraphics::SetTLSFontCacheLimit(size_t bytes) { } 859 void SkGraphics::SetTLSFontCacheLimit(size_t bytes) { }
OLDNEW
« no previous file with comments | « gn/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698