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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 19243003: pdfviewer: native inline images support (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 side-by-side diff with in-line comments
Download patch
Index: experimental/PdfViewer/SkPdfRenderer.cpp
===================================================================
--- experimental/PdfViewer/SkPdfRenderer.cpp (revision 10013)
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy)
@@ -106,6 +106,8 @@
fPdfContext = parent->fPdfContext;
fCanvas = parent->fCanvas;
}
+
+ SkPdfNativeTokenizer* tokenizer() { return fTokenizer; }
};
class PdfMainLooper : public PdfTokenLooper {
@@ -1844,27 +1846,12 @@
}
PdfResult PdfInlineImageLooper::consumeToken(PdfToken& token) {
- //pdfContext.fInlineImage.fKeyValuePairs[key] = value;
- return kNYI_PdfResult;
+ SkASSERT(false);
+ return kIgnoreError_PdfResult;
}
void PdfInlineImageLooper::loop() {
- PdfToken token;
- while (readToken(fTokenizer, &token)) {
- if (token.fType == kKeyword_TokenType && strcmp(token.fKeyword, "BX") == 0) {
- PdfTokenLooper* looper = new PdfCompatibilitySectionLooper();
- looper->setUp(this);
- looper->loop();
- } else {
- if (token.fType == kKeyword_TokenType && strcmp(token.fKeyword, "EI") == 0) {
- done();
- return;
- }
-
- consumeToken(token);
- }
- }
- // TODO(edisonn): report error/warning, EOF without EI.
+ doXObject_Image(fPdfContext, fCanvas, fTokenizer->readInlineImage());
}
PdfResult PdfInlineImageLooper::done() {
« no previous file with comments | « experimental/PdfViewer/PdfReference-okular-1.txt ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698