diff options
author | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-07 21:11:57 +0000 |
---|---|---|
committer | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-07 21:11:57 +0000 |
commit | 4f898b78bb1c04e4763eca59a6e1defef555e696 (patch) | |
tree | 3213518c29c67c778189119345cbfef73b507e4b /experimental/PdfViewer/pdfparser | |
parent | 590a5af1210bb66e0087a654229763a1822d6d50 (diff) |
pdfviewer: absolute minimal; to al least render (even if poorly) ICC based color spaces, based on RGB
Review URL: https://codereview.chromium.org/22624002
git-svn-id: http://skia.googlecode.com/svn/trunk@10630 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/PdfViewer/pdfparser')
-rw-r--r-- | experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp b/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp index 2e7e670ce9..d9f680cc3e 100644 --- a/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp +++ b/experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp @@ -207,6 +207,18 @@ void SkNativeParsedPDF::loadWithoutXRef() { current = skipPdfWhiteSpaces(0, current, end); } + // TODO(edisonn): hack, detect root catalog - we need to implement liniarized support, and remove this hack. + if (!fRootCatalogRef) { + for (unsigned int i = 0 ; i < objects(); i++) { + SkPdfObject* obj = object(i); + SkPdfObject* root = (obj && obj->isDictionary()) ? obj->get("Root") : NULL; + if (root && root->isReference()) { + fRootCatalogRef = root; + } + } + } + + if (fRootCatalogRef) { fRootCatalog = (SkPdfCatalogDictionary*)resolveReference(fRootCatalogRef); if (fRootCatalog->isDictionary() && fRootCatalog->valid()) { @@ -217,6 +229,7 @@ void SkNativeParsedPDF::loadWithoutXRef() { } } + } // TODO(edisonn): NYI |