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

Unified Diff: experimental/PdfViewer/SkPdfRenderer.h

Issue 20087003: pdfviewer: remove dependency on picture_utils. add utility function to render SkStream into bitmap. (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/SkPdfRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfRenderer.h
===================================================================
--- experimental/PdfViewer/SkPdfRenderer.h (revision 10286)
+++ experimental/PdfViewer/SkPdfRenderer.h (working copy)
@@ -9,10 +9,17 @@
#ifndef SkPdfRenderer_DEFINED
#define SkPdfRenderer_DEFINED
+class SkBitmap;
class SkCanvas;
class SkNativeParsedPDF;
class SkRect;
+class SkStream;
+enum SkPdfContent {
+ kNoForms_SkPdfContent,
+ kAll_SkPdfContent,
+};
+
// TODO(edisonn): move in another file
class SkPdfRenderer : public SkRefCnt {
SkNativeParsedPDF* fPdfDoc;
@@ -24,6 +31,7 @@
bool renderPage(int page, SkCanvas* canvas, const SkRect& dst) const;
bool load(const SkString inputFileName);
+ bool load(SkStream* stream);
bool loaded() const {return fPdfDoc != NULL;}
int pages() const;
void unload();
@@ -33,4 +41,10 @@
void reportPdfRenderStats();
+bool SkPDFNativeRenderToBitmap(SkStream* stream,
+ SkBitmap* output,
+ int page = 0,
+ SkPdfContent content = kAll_SkPdfContent,
+ double dpi = 72.0);
+
#endif // SkPdfRenderer_DEFINED
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698