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

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

Issue 23904003: Remove GrRefCnt.h in favor of SkRefCnt.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm GrRefCnt.h Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrTextStrike.cpp ('k') | src/gpu/SkGrPixelRef.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 9
10 #include "GrTemplates.h" 10 #include "GrTemplates.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 /////////////////////////////////////////////////////////////////////////////// 68 ///////////////////////////////////////////////////////////////////////////////
69 69
70 SkGrFontScaler::SkGrFontScaler(SkGlyphCache* strike) { 70 SkGrFontScaler::SkGrFontScaler(SkGlyphCache* strike) {
71 fStrike = strike; 71 fStrike = strike;
72 fKey = NULL; 72 fKey = NULL;
73 } 73 }
74 74
75 SkGrFontScaler::~SkGrFontScaler() { 75 SkGrFontScaler::~SkGrFontScaler() {
76 GrSafeUnref(fKey); 76 SkSafeUnref(fKey);
77 } 77 }
78 78
79 GrMaskFormat SkGrFontScaler::getMaskFormat() { 79 GrMaskFormat SkGrFontScaler::getMaskFormat() {
80 SkMask::Format format = fStrike->getMaskFormat(); 80 SkMask::Format format = fStrike->getMaskFormat();
81 switch (format) { 81 switch (format) {
82 case SkMask::kBW_Format: 82 case SkMask::kBW_Format:
83 // fall through to kA8 -- we store BW glyphs in our 8-bit cache 83 // fall through to kA8 -- we store BW glyphs in our 8-bit cache
84 case SkMask::kA8_Format: 84 case SkMask::kA8_Format:
85 return kA8_GrMaskFormat; 85 return kA8_GrMaskFormat;
86 case SkMask::kLCD16_Format: 86 case SkMask::kLCD16_Format:
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { 192 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) {
193 193
194 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); 194 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID);
195 const SkPath* skPath = fStrike->findPath(glyph); 195 const SkPath* skPath = fStrike->findPath(glyph);
196 if (skPath) { 196 if (skPath) {
197 *path = *skPath; 197 *path = *skPath;
198 return true; 198 return true;
199 } 199 }
200 return false; 200 return false;
201 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextStrike.cpp ('k') | src/gpu/SkGrPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698