| Index: ui/gfx/codec/vector_wstream.cc
|
| diff --git a/ui/gfx/codec/vector_wstream.cc b/ui/gfx/codec/vector_wstream.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6d485a2558c07143ecd4c35f94ff6df624aa695c
|
| --- /dev/null
|
| +++ b/ui/gfx/codec/vector_wstream.cc
|
| @@ -0,0 +1,19 @@
|
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/gfx/codec/vector_wstream.h"
|
| +
|
| +namespace gfx {
|
| +
|
| +bool VectorWStream::write(const void* buffer, size_t size) {
|
| + const unsigned char* ptr = reinterpret_cast<const unsigned char*>(buffer);
|
| + dst_->insert(dst_->end(), ptr, ptr + size);
|
| + return true;
|
| +}
|
| +
|
| +size_t VectorWStream::bytesWritten() const {
|
| + return dst_->size();
|
| +}
|
| +
|
| +} // namespace gfx
|
|
|