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

Side by Side Diff: ui/gfx/codec/codec_priv.h

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 unified diff | Download patch
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 #ifndef UI_GFX_CODEC_PRIV_CODEC_H_
6 #define UI_GFX_CODEC_PRIV_CODEC_H_
7
8 #include <stddef.h>
9
10 #include <vector>
11
12 #include "base/logging.h"
13 #include "third_party/skia/include/core/SkStream.h"
14
15 namespace gfx {
16
17 class VectorWStream : public SkWStream {
scroggo_chromium 2017/06/16 18:56:51 Are you planning to put more stuff in here? Maybe
liyuqian 2017/06/23 13:54:25 Done.
18 public:
19 VectorWStream(std::vector<unsigned char>* dst) : dst_(dst) {
scroggo_chromium 2017/06/16 18:56:51 Maybe comment here that it does not take ownership
liyuqian 2017/06/23 13:54:25 Done.
20 DCHECK(dst_);
21 DCHECK_EQ(0UL, dst_->size());
22 }
23
24 bool write(const void* buffer, size_t size) override;
25
26 size_t bytesWritten() const override;
27
28 private:
29 // Does not have ownership.
30 std::vector<unsigned char>* dst_;
31 };
32 }
Elliot Glaysher 2017/06/16 19:08:11 newline before '}', and also, add " // namespace
liyuqian 2017/06/23 13:54:25 Done.
33
34 #endif
Elliot Glaysher 2017/06/16 19:08:11 Header guard comment. // UI_GFX_CODEC_PRIV_CODEC_H
liyuqian 2017/06/23 13:54:25 Done.
OLDNEW
« no previous file with comments | « ui/gfx/codec/BUILD.gn ('k') | ui/gfx/codec/codec_priv.cc » ('j') | ui/gfx/codec/codec_priv.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698