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

Side by Side Diff: ui/gfx/codec/vector_wstream.cc

Issue 2944633002: Use SkPngEncoder in gfx jpeg_codec (Closed)
Patch Set: Nit Created 3 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 unified diff | Download patch
« ui/gfx/codec/png_codec.cc ('K') | « ui/gfx/codec/vector_wstream.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/codec/vector_wstream.h"
6
7 namespace gfx {
8
9 bool VectorWStream::write(const void* buffer, size_t size) {
10 const unsigned char* ptr = reinterpret_cast<const unsigned char*>(buffer);
11 dst_->insert(dst_->end(), ptr, ptr + size);
12 return true;
13 }
14
15 size_t VectorWStream::bytesWritten() const {
16 return dst_->size();
17 }
18
19 } // namespace gfx
OLDNEW
« ui/gfx/codec/png_codec.cc ('K') | « ui/gfx/codec/vector_wstream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698