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

Unified Diff: experimental/tools/SkDmuxWStream.h

Issue 868333002: experimental/skp_to_pdf_md5 optionally also outputs pdf files (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | experimental/tools/SkDmuxWStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/tools/SkDmuxWStream.h
diff --git a/experimental/tools/SkDmuxWStream.h b/experimental/tools/SkDmuxWStream.h
new file mode 100644
index 0000000000000000000000000000000000000000..52376c527f0fbb398f19764a04a3c9f4c60632a0
--- /dev/null
+++ b/experimental/tools/SkDmuxWStream.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkDmuxWStream_DEFINED
+#define SkDmuxWStream_DEFINED
+
+#include "SkStream.h"
+#include "SkTDArray.h"
+
+/**
+ * A SkWStream Demultiplexer. If initialized with
+ * SkDmuxWStream dmuxWStream(NULL, 0);
+ * then it becomes a /dev/null.
+ */
+class SkDmuxWStream : public SkWStream {
+public:
+ SkDmuxWStream(SkWStream* const streamArray[], size_t count);
+ ~SkDmuxWStream();
+ virtual bool write(const void* buffer, size_t size) SK_OVERRIDE;
+ virtual void newline() SK_OVERRIDE;
+ virtual void flush() SK_OVERRIDE;
+ virtual size_t bytesWritten() const SK_OVERRIDE;
+
+private:
+ SkTDArray<SkWStream*> fWStreams;
+ size_t fBytesWritten;
+};
+
+#endif // SkDmuxWStream_DEFINED
« no previous file with comments | « no previous file | experimental/tools/SkDmuxWStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698