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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | experimental/PdfViewer/inc/SkPdfTokenLooper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPdfContext_DEFINED 8 #ifndef SkPdfContext_DEFINED
9 #define SkPdfContext_DEFINED 9 #define SkPdfContext_DEFINED
10 10
11 #include "SkMatrix.h" 11 #include "SkMatrix.h"
12 #include "SkPdfGraphicsState.h"
13 #include "SkPdfNativeTokenizer.h"
12 #include "SkTDStackNester.h" 14 #include "SkTDStackNester.h"
13 #include "SkPdfGraphicsState.h" 15 #include "SkTypes.h"
14 16
15 class SkPdfAllocator; 17 class SkCanvas;
16 class SkPdfNativeDoc; 18 class SkPdfNativeDoc;
17 class SkPdfNativeObject; 19 class SkPdfNativeObject;
18 20
19 /** \class SkPdfContext 21 /**
20 * The context of the drawing. The document we draw from, the current stack of objects, ... 22 * The context of the drawing. The document we draw from, the current stack of
23 * objects, ...
21 */ 24 */
22 class SkPdfContext { 25 class SkPdfContext : public SkNoncopyable {
23 public: 26 public:
27 // FIXME (scroggo): Add functions for accessing these.
24 SkTDStackNester<SkPdfNativeObject*> fObjectStack; 28 SkTDStackNester<SkPdfNativeObject*> fObjectStack;
25 SkTDStackNester<SkPdfGraphicsState> fStateStack; 29 SkTDStackNester<SkPdfGraphicsState> fStateStack;
26 SkPdfGraphicsState fGraphicsState; 30 SkPdfGraphicsState fGraphicsState;
27 SkPdfNativeDoc* fPdfDoc; 31 SkPdfNativeDoc* fPdfDoc;
28 SkPdfAllocator* fTmpPageAllocator;
29 SkMatrix fOriginalMatrix; 32 SkMatrix fOriginalMatrix;
30 33
31 SkPdfContext(SkPdfNativeDoc* doc); 34 // Does not take ownership of the doc.
32 ~SkPdfContext(); 35 explicit SkPdfContext(SkPdfNativeDoc* doc);
36
37 /**
38 * Parse the stream and draw its commands to the canvas.
39 * FIXME (scroggo): May not be the best place for this, but leaving here
40 * for now, since it uses SkPdfContext's members.
41 */
42 void parseStream(SkPdfNativeObject* stream, SkCanvas* canvas);
43
44 private:
45 // FIXME (scroggo): Is this the right place for the allocator?
46 SkPdfAllocator fTmpPageAllocator;
33 }; 47 };
34 #endif // SkPdfContext_DEFINED 48 #endif // SkPdfContext_DEFINED
OLDNEW
« 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