Chromium Code Reviews| Index: experimental/PdfViewer/inc/SkPdfContext.h |
| diff --git a/experimental/PdfViewer/inc/SkPdfContext.h b/experimental/PdfViewer/inc/SkPdfContext.h |
| index 7bb9c840b16344f7ef7ce743093be700de9f9987..c266f04c782e5f13f60336a88371bd8193e335cb 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; |
| + // Does not take ownership of the doc. |
| SkPdfContext(SkPdfNativeDoc* doc); |
|
mtklein
2013/11/22 14:40:20
explicit?
scroggo
2013/11/22 15:03:00
Done.
|
| - ~SkPdfContext(); |
| + |
| + /** |
| + * 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 |