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

Unified Diff: src/pdf/SkPDFStream.h

Issue 2190883003: SkPDF: PDFStream has-a not is-a PDFDict (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-07-29 (Friday) 12:30:20 EDT Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | src/pdf/SkPDFStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFStream.h
diff --git a/src/pdf/SkPDFStream.h b/src/pdf/SkPDFStream.h
deleted file mode 100644
index 32632c6699d07cc246af5a5515fa7d99199f698e..0000000000000000000000000000000000000000
--- a/src/pdf/SkPDFStream.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkPDFStream_DEFINED
-#define SkPDFStream_DEFINED
-
-#include "SkPDFTypes.h"
-#include "SkStream.h"
-
-/** \class SkPDFStream
-
- A stream object in a PDF. Note, all streams must be indirect objects (via
- SkObjRef).
-*/
-class SkPDFStream : public SkPDFDict {
-
-public:
- /** Create a PDF stream. A Length entry is automatically added to the
- * stream dictionary.
- * @param data The data part of the stream. */
- explicit SkPDFStream(sk_sp<SkData> data) {
- this->setData(std::unique_ptr<SkStreamAsset>(
- new SkMemoryStream(std::move(data))));
- }
-
- /** Create a PDF stream. A Length entry is automatically added to the
- * stream dictionary.
- * @param stream The data part of the stream.
- */
- explicit SkPDFStream(std::unique_ptr<SkStreamAsset> stream) {
- this->setData(std::move(stream));
- }
-
- virtual ~SkPDFStream();
-
- // The SkPDFObject interface.
- void emitObject(SkWStream* stream,
- const SkPDFObjNumMap& objNumMap,
- const SkPDFSubstituteMap& substitutes) const override;
- void drop() override;
-
-protected:
- /* Create a PDF stream with no data. The setData method must be called to
- * set the data.
- */
- SkPDFStream() {}
-
- /** Only call this function once. */
- void setData(std::unique_ptr<SkStreamAsset> stream);
-
-private:
- std::unique_ptr<SkStreamAsset> fCompressedData;
-
- typedef SkPDFDict INHERITED;
-};
-
-#endif
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | src/pdf/SkPDFStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698