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

Unified Diff: experimental/PdfViewer/inc/SkPdfContext.h

Issue 79933003: Restructuring of PdfViewer code. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Respond to comments. Created 7 years, 1 month 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/inc/SkPdfTokenLooper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/inc/SkPdfContext.h
diff --git a/experimental/PdfViewer/inc/SkPdfContext.h b/experimental/PdfViewer/inc/SkPdfContext.h
index 7bb9c840b16344f7ef7ce743093be700de9f9987..a547fd6c301882acc03ce733c7011925b26fd491 100644
--- a/experimental/PdfViewer/inc/SkPdfContext.h
+++ b/experimental/PdfViewer/inc/SkPdfContext.h
@@ -9,26 +9,40 @@
#define SkPdfContext_DEFINED
#include "SkMatrix.h"
-#include "SkTDStackNester.h"
#include "SkPdfGraphicsState.h"
+#include "SkPdfNativeTokenizer.h"
+#include "SkTDStackNester.h"
+#include "SkTypes.h"
-class SkPdfAllocator;
+class SkCanvas;
class SkPdfNativeDoc;
class SkPdfNativeObject;
-/** \class SkPdfContext
- * The context of the drawing. The document we draw from, the current stack of objects, ...
+/**
+ * The context of the drawing. The document we draw from, the current stack of
+ * objects, ...
*/
-class SkPdfContext {
+class SkPdfContext : public SkNoncopyable {
public:
+ // FIXME (scroggo): Add functions for accessing these.
SkTDStackNester<SkPdfNativeObject*> fObjectStack;
SkTDStackNester<SkPdfGraphicsState> fStateStack;
SkPdfGraphicsState fGraphicsState;
SkPdfNativeDoc* fPdfDoc;
- SkPdfAllocator* fTmpPageAllocator;
SkMatrix fOriginalMatrix;
- SkPdfContext(SkPdfNativeDoc* doc);
- ~SkPdfContext();
+ // Does not take ownership of the doc.
+ explicit SkPdfContext(SkPdfNativeDoc* doc);
+
+ /**
+ * Parse the stream and draw its commands to the canvas.
+ * FIXME (scroggo): May not be the best place for this, but leaving here
+ * for now, since it uses SkPdfContext's members.
+ */
+ void parseStream(SkPdfNativeObject* stream, SkCanvas* canvas);
+
+private:
+ // FIXME (scroggo): Is this the right place for the allocator?
+ SkPdfAllocator fTmpPageAllocator;
};
#endif // SkPdfContext_DEFINED
« no previous file with comments | « no previous file | experimental/PdfViewer/inc/SkPdfTokenLooper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698