aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/tools/SkDmuxWStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/tools/SkDmuxWStream.cpp')
-rw-r--r--experimental/tools/SkDmuxWStream.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/experimental/tools/SkDmuxWStream.cpp b/experimental/tools/SkDmuxWStream.cpp
deleted file mode 100644
index 6dde5bfa3b..0000000000
--- a/experimental/tools/SkDmuxWStream.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkDmuxWStream.h"
-
-SkDmuxWStream::SkDmuxWStream(SkWStream* const streamArray[], size_t count)
- : fWStreams(streamArray, static_cast<int>(count)), fBytesWritten(0) {}
-
-SkDmuxWStream::~SkDmuxWStream() {
- for (int i = 0; i < fWStreams.count(); ++i) {
- fWStreams[i]->flush();
- }
-}
-
-bool SkDmuxWStream::write(const void* buffer, size_t size) {
- for (int i = 0; i < fWStreams.count(); ++i) {
- if (!fWStreams[i]->write(buffer, size)) {
- return false;
- }
- }
- fBytesWritten += size;
- return true;
-}
-
-void SkDmuxWStream::newline() {
- for (int i = 0; i < fWStreams.count(); ++i) {
- fWStreams[i]->newline();
- }
- fBytesWritten += 1; // This may be a lie.
-}
-
-void SkDmuxWStream::flush() {
- for (int i = 0; i < fWStreams.count(); ++i) {
- fWStreams[i]->flush();
- }
-}
-
-size_t SkDmuxWStream::bytesWritten() const { return fBytesWritten; }