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

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

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SkGlyphCache.h ('k') | src/core/SkGraphics.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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 fPrev = fNext = nullptr; 46 fPrev = fNext = nullptr;
47 47
48 fScalerContext->getFontMetrics(&fFontMetrics); 48 fScalerContext->getFontMetrics(&fFontMetrics);
49 49
50 fMemoryUsed = sizeof(*this); 50 fMemoryUsed = sizeof(*this);
51 51
52 fAuxProcList = nullptr; 52 fAuxProcList = nullptr;
53 } 53 }
54 54
55 SkGlyphCache::~SkGlyphCache() { 55 SkGlyphCache::~SkGlyphCache() {
56 fGlyphMap.foreach ([](SkGlyph* g) { 56 fGlyphMap.foreach ([](SkGlyph* g) {
57 if (g->fPathData) { 57 if (g->fPathData) {
58 delete g->fPathData->fPath; 58 delete g->fPathData->fPath;
59 } } ); 59 } } );
60 SkDescriptor::Free(fDesc); 60 SkDescriptor::Free(fDesc);
61 delete fScalerContext; 61 delete fScalerContext;
62 this->invokeAndRemoveAuxProcs(); 62 this->invokeAndRemoveAuxProcs();
63 } 63 }
64 64
65 SkGlyphCache::CharGlyphRec* SkGlyphCache::getCharGlyphRec(PackedUnicharID packed UnicharID) { 65 SkGlyphCache::CharGlyphRec* SkGlyphCache::getCharGlyphRec(PackedUnicharID packed UnicharID) {
66 if (nullptr == fPackedUnicharIDToPackedGlyphID.get()) { 66 if (nullptr == fPackedUnicharIDToPackedGlyphID.get()) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 } 261 }
262 *count += 2; 262 *count += 2;
263 } 263 }
264 264
265 void SkGlyphCache::AddInterval(SkScalar val, SkGlyph::Intercept* intercept) { 265 void SkGlyphCache::AddInterval(SkScalar val, SkGlyph::Intercept* intercept) {
266 intercept->fInterval[0] = SkTMin(intercept->fInterval[0], val); 266 intercept->fInterval[0] = SkTMin(intercept->fInterval[0], val);
267 intercept->fInterval[1] = SkTMax(intercept->fInterval[1], val); 267 intercept->fInterval[1] = SkTMax(intercept->fInterval[1], val);
268 } 268 }
269 269
270 void SkGlyphCache::AddPoints(const SkPoint* pts, int ptCount, const SkScalar bou nds[2], 270 void SkGlyphCache::AddPoints(const SkPoint* pts, int ptCount, const SkScalar bou nds[2],
271 bool yAxis, SkGlyph::Intercept* intercept) { 271 bool yAxis, SkGlyph::Intercept* intercept) {
272 for (int i = 0; i < ptCount; ++i) { 272 for (int i = 0; i < ptCount; ++i) {
273 SkScalar val = *(&pts[i].fY - yAxis); 273 SkScalar val = *(&pts[i].fY - yAxis);
274 if (bounds[0] < val && val < bounds[1]) { 274 if (bounds[0] < val && val < bounds[1]) {
275 AddInterval(*(&pts[i].fX + yAxis), intercept); 275 AddInterval(*(&pts[i].fX + yAxis), intercept);
276 } 276 }
277 } 277 }
278 } 278 }
279 279
280 void SkGlyphCache::AddLine(const SkPoint pts[2], SkScalar axis, bool yAxis, 280 void SkGlyphCache::AddLine(const SkPoint pts[2], SkScalar axis, bool yAxis,
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 } 813 }
814 814
815 void SkGraphics::PurgeFontCache() { 815 void SkGraphics::PurgeFontCache() {
816 get_globals().purgeAll(); 816 get_globals().purgeAll();
817 SkTypefaceCache::PurgeAll(); 817 SkTypefaceCache::PurgeAll();
818 } 818 }
819 819
820 // TODO(herb): clean up TLS apis. 820 // TODO(herb): clean up TLS apis.
821 size_t SkGraphics::GetTLSFontCacheLimit() { return 0; } 821 size_t SkGraphics::GetTLSFontCacheLimit() { return 0; }
822 void SkGraphics::SetTLSFontCacheLimit(size_t bytes) { } 822 void SkGraphics::SetTLSFontCacheLimit(size_t bytes) { }
OLDNEW
« no previous file with comments | « src/core/SkGlyphCache.h ('k') | src/core/SkGraphics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698