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

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

Issue 21738005: pdfviewer: add indexed rbg image support, enhanche caching(setData) for SkPdfObject (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
Index: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (revision 10498)
+++ experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (working copy)
@@ -306,7 +306,7 @@
}
if (storeCatalog) {
- const SkPdfObject* ref = trailer->Root(NULL);
+ SkPdfObject* ref = trailer->Root(NULL);
if (ref == NULL || !ref->isReference()) {
// TODO(edisonn): oops, we have to fix the corrup pdf file
return current;
@@ -384,7 +384,7 @@
}
void SkNativeParsedPDF::fillPages(SkPdfPageTreeNodeDictionary* tree) {
- const SkPdfArray* kids = tree->Kids(this);
+ SkPdfArray* kids = tree->Kids(this);
if (kids == NULL) {
*fPages.append() = (SkPdfPageObjectDictionary*)tree;
return;
@@ -392,7 +392,7 @@
int cnt = kids->size();
for (int i = 0; i < cnt; i++) {
- const SkPdfObject* obj = resolveReference(kids->objAtAIndex(i));
+ SkPdfObject* obj = resolveReference(kids->objAtAIndex(i));
if (fMapper->mapPageObjectDictionary(obj) != kPageObjectDictionary_SkPdfObjectType) {
*fPages.append() = (SkPdfPageObjectDictionary*)obj;
} else {
@@ -506,7 +506,7 @@
// TODO(edisonn): fix infinite loop if ref to itself!
// TODO(edisonn): perf, fix refs at load, and resolve will simply return fResolvedReference?
-SkPdfObject* SkNativeParsedPDF::resolveReference(const SkPdfObject* ref) {
+SkPdfObject* SkNativeParsedPDF::resolveReference(SkPdfObject* ref) {
if (ref && ref->isReference()) {
int id = ref->referenceId();
// TODO(edisonn): generation/updates not supported now

Powered by Google App Engine
This is Rietveld 408576698