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

Unified Diff: ui/gfx/codec/codec_priv.cc

Issue 2944633002: Use SkPngEncoder in gfx jpeg_codec (Closed)
Patch Set: Created 3 years, 6 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
Index: ui/gfx/codec/codec_priv.cc
diff --git a/ui/gfx/codec/codec_priv.cc b/ui/gfx/codec/codec_priv.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d00a33fac97f9ced961bd725d57e4224f38893c6
--- /dev/null
+++ b/ui/gfx/codec/codec_priv.cc
@@ -0,0 +1,18 @@
+// 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/codec_priv.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();
+}
+}
Elliot Glaysher 2017/06/16 19:08:11 Same thing with newline and namespace.
liyuqian 2017/06/23 13:54:25 Done.

Powered by Google App Engine
This is Rietveld 408576698