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 |