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

Unified Diff: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp

Issue 22624002: pdfviewer: absolute minimal; to al least render (even if poorly) ICC based color spaces, based on R… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/SkPdfRenderer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (revision 10617)
+++ experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (working copy)
@@ -207,6 +207,18 @@
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 @@
}
}
+
}
// TODO(edisonn): NYI
« no previous file with comments | « experimental/PdfViewer/SkPdfRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698