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

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

Issue 23163007: pdfviewer: make pdfviewer compile on mac 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/pdfparser/native/SkPdfNativeTokenizer.h ('k') | gyp/pdfviewer.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp (revision 10716)
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp (working copy)
@@ -3,9 +3,12 @@
#include "SkPdfNativeObject.h"
#include "SkPdfConfig.h"
-#include "SkPdfStreamCommonDictionary_autogen.h"
-#include "SkPdfImageDictionary_autogen.h"
+// TODO(edisonn): mac builder does not find the header ... but from headers is ok
+//#include "SkPdfStreamCommonDictionary_autogen.h"
+//#include "SkPdfImageDictionary_autogen.h"
+#include "SkPdfHeaders_autogen.h"
+
// TODO(edisonn): perf!!!
// there could be 0s between start and end! but not in the needle.
static char* strrstrk(char* hayStart, char* hayEnd, const char* needle) {
@@ -902,7 +905,7 @@
}
// TODO(edisonn): perf: do no copy the buffers, but use them, and mark cache the result, so there is no need of a second pass
-SkPdfNativeTokenizer::SkPdfNativeTokenizer(SkPdfNativeObject* objWithStream, const SkPdfMapper* mapper, SkPdfAllocator* allocator, SkPdfNativeDoc* doc) : fDoc(doc), fMapper(mapper), fAllocator(allocator), fUncompressedStream(NULL), fUncompressedStreamEnd(NULL), fEmpty(false), fHasPutBack(false) {
+SkPdfNativeTokenizer::SkPdfNativeTokenizer(SkPdfNativeObject* objWithStream, SkPdfAllocator* allocator, SkPdfNativeDoc* doc) : fDoc(doc), fAllocator(allocator), fUncompressedStream(NULL), fUncompressedStreamEnd(NULL), fEmpty(false), fHasPutBack(false) {
const unsigned char* buffer = NULL;
size_t len = 0;
objWithStream->GetFilteredStreamRef(&buffer, &len);
@@ -915,7 +918,7 @@
fUncompressedStreamEnd = fUncompressedStream + len;
}
-SkPdfNativeTokenizer::SkPdfNativeTokenizer(const unsigned char* buffer, int len, const SkPdfMapper* mapper, SkPdfAllocator* allocator, SkPdfNativeDoc* doc) : fDoc(doc), fMapper(mapper), fAllocator(allocator), fEmpty(false), fHasPutBack(false) {
+SkPdfNativeTokenizer::SkPdfNativeTokenizer(const unsigned char* buffer, int len, SkPdfAllocator* allocator, SkPdfNativeDoc* doc) : fDoc(doc), fAllocator(allocator), fEmpty(false), fHasPutBack(false) {
// TODO(edisonn): hack, find end of object
char* endobj = strrstrk((char*)buffer, (char*)buffer + len, "endobj");
if (endobj) {
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h ('k') | gyp/pdfviewer.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698