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

Side by Side Diff: experimental/PdfViewer/inc/SkPdfContext.h

Issue 226183018: SkNonCopyable should be used with private inheritance. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: name resolution Created 6 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | experimental/PdfViewer/inc/SkPdfRenderer.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" 12 #include "SkPdfGraphicsState.h"
13 #include "SkPdfNativeTokenizer.h" 13 #include "SkPdfNativeTokenizer.h"
14 #include "SkTDStackNester.h" 14 #include "SkTDStackNester.h"
15 #include "SkTypes.h" 15 #include "SkTypes.h"
16 16
17 class SkCanvas; 17 class SkCanvas;
18 class SkPdfNativeDoc; 18 class SkPdfNativeDoc;
19 class SkPdfNativeObject; 19 class SkPdfNativeObject;
20 20
21 /** 21 /**
22 * The context of the drawing. The document we draw from, the current stack of 22 * The context of the drawing. The document we draw from, the current stack of
23 * objects, ... 23 * objects, ...
24 */ 24 */
25 class SkPdfContext : public SkNoncopyable { 25 class SkPdfContext : SkNoncopyable {
26 public: 26 public:
27 // FIXME (scroggo): Add functions for accessing these. 27 // FIXME (scroggo): Add functions for accessing these.
28 SkTDStackNester<SkPdfNativeObject*> fObjectStack; 28 SkTDStackNester<SkPdfNativeObject*> fObjectStack;
29 SkTDStackNester<SkPdfGraphicsState> fStateStack; 29 SkTDStackNester<SkPdfGraphicsState> fStateStack;
30 SkPdfGraphicsState fGraphicsState; 30 SkPdfGraphicsState fGraphicsState;
31 SkPdfNativeDoc* fPdfDoc; 31 SkPdfNativeDoc* fPdfDoc;
32 SkMatrix fOriginalMatrix; 32 SkMatrix fOriginalMatrix;
33 33
34 // Does not take ownership of the doc. 34 // Does not take ownership of the doc.
35 explicit SkPdfContext(SkPdfNativeDoc* doc); 35 explicit SkPdfContext(SkPdfNativeDoc* doc);
36 36
37 /** 37 /**
38 * Parse the stream and draw its commands to the canvas. 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 39 * FIXME (scroggo): May not be the best place for this, but leaving here
40 * for now, since it uses SkPdfContext's members. 40 * for now, since it uses SkPdfContext's members.
41 */ 41 */
42 void parseStream(SkPdfNativeObject* stream, SkCanvas* canvas); 42 void parseStream(SkPdfNativeObject* stream, SkCanvas* canvas);
43 43
44 private: 44 private:
45 // FIXME (scroggo): Is this the right place for the allocator? 45 // FIXME (scroggo): Is this the right place for the allocator?
46 SkPdfAllocator fTmpPageAllocator; 46 SkPdfAllocator fTmpPageAllocator;
47 }; 47 };
48 #endif // SkPdfContext_DEFINED 48 #endif // SkPdfContext_DEFINED
OLDNEW
« no previous file with comments | « no previous file | experimental/PdfViewer/inc/SkPdfRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698