Index: experimental/PdfViewer/src/SkPdfContext.cpp |
diff --git a/experimental/PdfViewer/src/SkPdfContext.cpp b/experimental/PdfViewer/src/SkPdfContext.cpp |
index b033e7a7685561b4dc3026034b9ca3ca737373f5..670e6ce48d62c6fc9e1aad3980edd94049f13146 100644 |
--- a/experimental/PdfViewer/src/SkPdfContext.cpp |
+++ b/experimental/PdfViewer/src/SkPdfContext.cpp |
@@ -35,15 +35,14 @@ SkPdfContext::SkPdfContext(SkPdfNativeDoc* doc) |
} |
void SkPdfContext::parseStream(SkPdfNativeObject* stream, SkCanvas* canvas) { |
- SkPdfNativeTokenizer* tokenizer = fPdfDoc->tokenizerOfStream(stream, &fTmpPageAllocator); |
- if (NULL == tokenizer) { |
+ if (NULL == stream) { |
// Nothing to parse. |
return; |
} |
- PdfMainLooper looper(tokenizer, this, canvas); |
+ |
+ SkPdfNativeTokenizer tokenizer(stream, &fTmpPageAllocator, fPdfDoc); |
+ PdfMainLooper looper(&tokenizer, this, canvas); |
looper.loop(); |
- // FIXME (scroggo): Will restructure to put tokenizer on the stack. |
- delete tokenizer; |
} |
/////////////////////////////////////////////////////////////////////////////// |