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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 1304493002: SkPDF: Simplify PDFStream / emitObject() const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting Created 5 years, 4 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/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFFontImpl.h » ('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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 return NULL; 1004 return NULL;
1005 } 1005 }
1006 SkPDFType0Font* newSubset = new SkPDFType0Font(fontInfo(), typeface()); 1006 SkPDFType0Font* newSubset = new SkPDFType0Font(fontInfo(), typeface());
1007 newSubset->populate(subset); 1007 newSubset->populate(subset);
1008 return newSubset; 1008 return newSubset;
1009 } 1009 }
1010 1010
1011 #ifdef SK_DEBUG 1011 #ifdef SK_DEBUG
1012 void SkPDFType0Font::emitObject(SkWStream* stream, 1012 void SkPDFType0Font::emitObject(SkWStream* stream,
1013 const SkPDFObjNumMap& objNumMap, 1013 const SkPDFObjNumMap& objNumMap,
1014 const SkPDFSubstituteMap& substitutes) { 1014 const SkPDFSubstituteMap& substitutes) const {
1015 SkASSERT(fPopulated); 1015 SkASSERT(fPopulated);
1016 return INHERITED::emitObject(stream, objNumMap, substitutes); 1016 return INHERITED::emitObject(stream, objNumMap, substitutes);
1017 } 1017 }
1018 #endif 1018 #endif
1019 1019
1020 bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) { 1020 bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) {
1021 insertName("Subtype", "Type0"); 1021 insertName("Subtype", "Type0");
1022 insertName("BaseFont", fontInfo()->fFontName); 1022 insertName("BaseFont", fontInfo()->fFontName);
1023 insertName("Encoding", "Identity-H"); 1023 insertName("Encoding", "Identity-H");
1024 1024
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 } 1412 }
1413 if (existingFont != NULL) { 1413 if (existingFont != NULL) {
1414 return (existingFont->fFirstGlyphID <= searchGlyphID && 1414 return (existingFont->fFirstGlyphID <= searchGlyphID &&
1415 searchGlyphID <= existingFont->fLastGlyphID) 1415 searchGlyphID <= existingFont->fLastGlyphID)
1416 ? SkPDFFont::kExact_Match 1416 ? SkPDFFont::kExact_Match
1417 : SkPDFFont::kRelated_Match; 1417 : SkPDFFont::kRelated_Match;
1418 } 1418 }
1419 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match 1419 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match
1420 : SkPDFFont::kRelated_Match; 1420 : SkPDFFont::kRelated_Match;
1421 } 1421 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFFontImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698