pdfviewer: fix type3 font, make SkPdfObject::get parameter const

Review URL: https://codereview.chromium.org/19670019

git-svn-id: http://skia.googlecode.com/svn/trunk@10289 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
edisonn@google.com 2013-07-23 19:43:48 +00:00
parent e94a7d2936
commit 2fd5d36ea6
2 changed files with 6 additions and 6 deletions

View File

@ -337,8 +337,8 @@ public:
if (dict->isEncodingAName(parsed)) {
fEncoding = SkPdfEncoding::fromName(dict->getEncodingAsName(parsed).c_str());
} else if (dict->isEncodingAEncodingdictionary(parsed)) {
// technically, there is no encoding.
fEncoding = SkPdfCIDToGIDMapIdentityEncoding::instance();
// No encoding.
fEncoding = SkPdfDefaultEncoding::instance();
fEncodingDict = dict->getEncodingAsEncodingdictionary(parsed);
}
}
@ -381,7 +381,7 @@ public:
if (j < fFirstChar || j > fLastChar) {
printf("break; error 2\n");
}
fChars[j - fFirstChar].fObj = fCharProcs->get((*diffs)[i]->nameValue());
fChars[j - fFirstChar].fObj = fCharProcs->get((*diffs)[i]);
j++;
} else {
// err

View File

@ -372,7 +372,7 @@ public:
// which will be used in code
// add function SkPdfFastNameKey key(const char* key);
// TODO(edisonn): setting the same key twike, will make the value undefined!
bool set(SkPdfObject* key, SkPdfObject* value) {
bool set(const SkPdfObject* key, SkPdfObject* value) {
SkASSERT(fObjectType == kDictionary_PdfObjectType);
SkASSERT(key->fObjectType == kName_PdfObjectType);
@ -402,7 +402,7 @@ public:
return fMap->set((const char*)key, len, value);
}
SkPdfObject* get(SkPdfObject* key) {
SkPdfObject* get(const SkPdfObject* key) {
SkASSERT(fObjectType == kDictionary_PdfObjectType);
SkASSERT(key->fObjectType == kName_PdfObjectType);
@ -432,7 +432,7 @@ public:
return ret;
}
const SkPdfObject* get(SkPdfObject* key) const {
const SkPdfObject* get(const SkPdfObject* key) const {
SkASSERT(fObjectType == kDictionary_PdfObjectType);
SkASSERT(key->fObjectType == kName_PdfObjectType);