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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.cpp

Issue 21604003: pdfviewer: debug the parameters for snc, and for resolveReference (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
« no previous file with comments | « no previous file | experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfRenderer.cpp
===================================================================
--- experimental/PdfViewer/SkPdfRenderer.cpp (revision 10494)
+++ experimental/PdfViewer/SkPdfRenderer.cpp (working copy)
@@ -1455,10 +1455,20 @@
}
static PdfResult PdfOp_SCN_scn(PdfContext* pdfContext, SkCanvas* canvas, SkPdfColorOperator* colorOperator) {
- //SkPdfString* name;
if (pdfContext->fObjectStack.top()->isName()) {
- // TODO(edisonn): get name, pass it
- pdfContext->fObjectStack.pop();
+ SkPdfObject* name = pdfContext->fObjectStack.top(); pdfContext->fObjectStack.pop();
+
+ //Next, get the ExtGState Dictionary from the Resource Dictionary:
+ SkPdfDictionary* extGStateDictionary = pdfContext->fGraphicsState.fResources->Pattern(pdfContext->fPdfDoc);
+
+ if (extGStateDictionary == NULL) {
+#ifdef PDF_TRACE
+ printf("ExtGState is NULL!\n");
+#endif
+ return kIgnoreError_PdfResult;
+ }
+
+ /*SkPdfObject* value = */pdfContext->fPdfDoc->resolveReference(extGStateDictionary->get(name));
}
// TODO(edisonn): SCN supports more color spaces than SCN. Read and implement spec.
« no previous file with comments | « no previous file | experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698