diff options
author | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-29 19:10:58 +0000 |
---|---|---|
committer | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-29 19:10:58 +0000 |
commit | e878e726bd1c16a0d177543471e071c7338193f4 (patch) | |
tree | 7062d8b84cd11dc4f347ac4c91cce65542d38f9f /experimental/PdfViewer/pdfparser/native | |
parent | 08df48d2411b33a9078f1621894d630f0b11cd60 (diff) |
pdfviewer: more plumming for soft masks, blend modes and transparency groups
Review URL: https://codereview.chromium.org/21125002
git-svn-id: http://skia.googlecode.com/svn/trunk@10419 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/PdfViewer/pdfparser/native')
3 files changed, 5 insertions, 5 deletions
diff --git a/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp b/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp index 8f92a0fcfe..8892ee2643 100644 --- a/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp +++ b/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp @@ -196,7 +196,7 @@ const unsigned char* SkNativeParsedPDF::readCrossReferenceSection(const unsigned token.reset(); current = nextObject(0, current, trailerEnd, &token, NULL, NULL); - if (!token.isKeyword() || token.len() != 1 || (*token.c_str() != 'f' && *token.c_str() != 'n')) { + if (!token.isKeyword() || token.lenstr() != 1 || (*token.c_str() != 'f' && *token.c_str() != 'n')) { // TODO(edisonn): report/warning return current; } @@ -215,7 +215,7 @@ long SkNativeParsedPDF::readTrailer(const unsigned char* trailerStart, const uns const unsigned char* current = nextObject(0, trailerStart, trailerEnd, &trailerKeyword, NULL, NULL); - if (!trailerKeyword.isKeyword() || strlen("trailer") != trailerKeyword.len() || + if (!trailerKeyword.isKeyword() || strlen("trailer") != trailerKeyword.lenstr() || strncmp(trailerKeyword.c_str(), "trailer", strlen("trailer")) != 0) { // TODO(edisonn): report warning, rebuild trailer from objects. return -1; diff --git a/experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp b/experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp index bc3a3faa79..41bd92d170 100644 --- a/experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp +++ b/experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp @@ -927,7 +927,7 @@ bool SkPdfNativeTokenizer::readTokenCore(PdfToken* token) { // If it is a keyword, we will only get the pointer of the string if (obj.type() == SkPdfObject::kKeyword_PdfObjectType) { token->fKeyword = obj.c_str(); - token->fKeywordLength = obj.len(); + token->fKeywordLength = obj.lenstr(); token->fType = kKeyword_TokenType; } else { SkPdfObject* pobj = fAllocator->allocObject(); @@ -1062,7 +1062,7 @@ SkPdfImageDictionary* SkPdfNativeTokenizer::readInlineImage() { SkPdfObject* key = fAllocator->allocObject(); fUncompressedStream = nextObject(0, fUncompressedStream, fUncompressedStreamEnd, key, fAllocator, fDoc); - if (key->isKeyword() && key->len() == 2 && key->c_str()[0] == 'I' && key->c_str()[1] == 'D') { // ID + if (key->isKeyword() && key->lenstr() == 2 && key->c_str()[0] == 'I' && key->c_str()[1] == 'D') { // ID fUncompressedStream = readInlineImageStream(0, fUncompressedStream, fUncompressedStreamEnd, inlineImage, fDoc); return inlineImage; } else { diff --git a/experimental/PdfViewer/pdfparser/native/SkPdfObject.h b/experimental/PdfViewer/pdfparser/native/SkPdfObject.h index 5525f7baf9..9df9a239e6 100644 --- a/experimental/PdfViewer/pdfparser/native/SkPdfObject.h +++ b/experimental/PdfViewer/pdfparser/native/SkPdfObject.h @@ -131,7 +131,7 @@ public: } } - size_t len() const { + size_t lenstr() const { switch (fObjectType) { case kString_PdfObjectType: case kHexString_PdfObjectType: |