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

Side by Side Diff: src/gpu/GrFontScaler.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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 | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpuResource.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 2010 Google Inc. 3 * Copyright 2010 Google Inc.
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 #include "GrFontScaler.h" 9 #include "GrFontScaler.h"
10 #include "SkDescriptor.h" 10 #include "SkDescriptor.h"
(...skipping 23 matching lines...) Expand all
34 case SkMask::kARGB32_Format: 34 case SkMask::kARGB32_Format:
35 return kARGB_GrMaskFormat; 35 return kARGB_GrMaskFormat;
36 default: 36 default:
37 SkDEBUGFAIL("unsupported SkMask::Format"); 37 SkDEBUGFAIL("unsupported SkMask::Format");
38 return kA8_GrMaskFormat; 38 return kA8_GrMaskFormat;
39 } 39 }
40 } 40 }
41 41
42 const GrFontDescKey* GrFontScaler::getKey() { 42 const GrFontDescKey* GrFontScaler::getKey() {
43 if (NULL == fKey) { 43 if (NULL == fKey) {
44 fKey = SkNEW_ARGS(GrFontDescKey, (fStrike->getDescriptor())); 44 fKey = new GrFontDescKey(fStrike->getDescriptor());
45 } 45 }
46 return fKey; 46 return fKey;
47 } 47 }
48 48
49 GrMaskFormat GrFontScaler::getPackedGlyphMaskFormat(const SkGlyph& glyph) const { 49 GrMaskFormat GrFontScaler::getPackedGlyphMaskFormat(const SkGlyph& glyph) const {
50 SkMask::Format format = static_cast<SkMask::Format>(glyph.fMaskFormat); 50 SkMask::Format format = static_cast<SkMask::Format>(glyph.fMaskFormat);
51 switch (format) { 51 switch (format) {
52 case SkMask::kBW_Format: 52 case SkMask::kBW_Format:
53 // fall through to kA8 -- we store BW glyphs in our 8-bit cache 53 // fall through to kA8 -- we store BW glyphs in our 8-bit cache
54 case SkMask::kA8_Format: 54 case SkMask::kA8_Format:
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 const SkPath* GrFontScaler::getGlyphPath(const SkGlyph& glyph) { 199 const SkPath* GrFontScaler::getGlyphPath(const SkGlyph& glyph) {
200 return fStrike->findPath(glyph); 200 return fStrike->findPath(glyph);
201 } 201 }
202 202
203 const SkGlyph& GrFontScaler::grToSkGlyph(GrGlyph::PackedID id) { 203 const SkGlyph& GrFontScaler::grToSkGlyph(GrGlyph::PackedID id) {
204 return fStrike->getGlyphIDMetrics(GrGlyph::UnpackID(id), 204 return fStrike->getGlyphIDMetrics(GrGlyph::UnpackID(id),
205 GrGlyph::UnpackFixedX(id), 205 GrGlyph::UnpackFixedX(id),
206 GrGlyph::UnpackFixedY(id)); 206 GrGlyph::UnpackFixedY(id));
207 } 207 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698