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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp

Issue 18584010: pdfviewer: add --pages arg: render a certain page (all, all in desceding order, firsl, last and by … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #include "SkNativeParsedPDF.h" 1 #include "SkNativeParsedPDF.h"
2 #include "SkPdfNativeTokenizer.h" 2 #include "SkPdfNativeTokenizer.h"
3 #include "SkPdfBasics.h" 3 #include "SkPdfBasics.h"
4 #include "SkPdfObject.h" 4 #include "SkPdfObject.h"
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 fObjects[id].fResolvedReference = resolveReference(fObjects[id]. fObj); 410 fObjects[id].fResolvedReference = resolveReference(fObjects[id]. fObj);
411 } 411 }
412 } 412 }
413 413
414 return fObjects[id].fResolvedReference; 414 return fObjects[id].fResolvedReference;
415 } 415 }
416 // TODO(edisonn): fix the mess with const, probably we need to remove it pre tty much everywhere 416 // TODO(edisonn): fix the mess with const, probably we need to remove it pre tty much everywhere
417 return (SkPdfObject*)ref; 417 return (SkPdfObject*)ref;
418 } 418 }
419 419
420 size_t SkNativeParsedPDF::bytesUsed() { 420 size_t SkNativeParsedPDF::bytesUsed() const {
421 return fAllocator->bytesUsed() + 421 return fAllocator->bytesUsed() +
422 fContentLength + 422 fContentLength +
423 fObjects.count() * sizeof(PublicObjectEntry) + 423 fObjects.count() * sizeof(PublicObjectEntry) +
424 fPages.count() * sizeof(SkPdfPageObjectDictionary*) + 424 fPages.count() * sizeof(SkPdfPageObjectDictionary*) +
425 sizeof(*this); 425 sizeof(*this);
426 } 426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698