skia2/experimental/PdfViewer/inc/SkPdfContext.h
commit-bot@chromium.org e3beb6bd7d SkNonCopyable should be used with private inheritance.
This is mostly s/public SkNoncopyable/SkNoncopyable/g.

Two classes (SkDrawLooper::Context and SkPicture::OperationList) don't actually work with SkNoncopyable because they introduce a virtual destructor.  I added SkNoncopyableVirtual to make them work as intended.  Sort of questionable whether they really need to be noncopyable in the first place, but I guess it doesn't hurt to keep the behavior the same.

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/226183018

git-svn-id: http://skia.googlecode.com/svn/trunk@14081 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-07 19:34:38 +00:00

49 lines
1.4 KiB
C++

/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkPdfContext_DEFINED
#define SkPdfContext_DEFINED
#include "SkMatrix.h"
#include "SkPdfGraphicsState.h"
#include "SkPdfNativeTokenizer.h"
#include "SkTDStackNester.h"
#include "SkTypes.h"
class SkCanvas;
class SkPdfNativeDoc;
class SkPdfNativeObject;
/**
* The context of the drawing. The document we draw from, the current stack of
* objects, ...
*/
class SkPdfContext : SkNoncopyable {
public:
// FIXME (scroggo): Add functions for accessing these.
SkTDStackNester<SkPdfNativeObject*> fObjectStack;
SkTDStackNester<SkPdfGraphicsState> fStateStack;
SkPdfGraphicsState fGraphicsState;
SkPdfNativeDoc* fPdfDoc;
SkMatrix fOriginalMatrix;
// 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