Debian Codegraph @

src/encode/SkPngEncoderImpl.h

raw
1 /*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkPngEncoderImpl_DEFINED
9 #define SkPngEncoderImpl_DEFINED
10
11 #include <cstdint>
12
13 #include "include/core/SkSpan.h"
14 #include "src/encode/SkPngEncoderBase.h"
15
16 #include <memory>
17
18 class SkPixmap;
19 class SkPngEncoderMgr;
20
21 class SkPngEncoderImpl final : public SkPngEncoderBase {
22 public:
23 // public so it can be called from SkPngEncoder namespace. It should only be made
24 // via SkPngEncoder::Make
25 SkPngEncoderImpl(TargetInfo targetInfo, std::unique_ptr<SkPngEncoderMgr>, const SkPixmap& src);
26 ~SkPngEncoderImpl() override;
27
28 protected:
29 bool onEncodeRow(SkSpan<const uint8_t> row) override;
30 bool onFinishEncoding() override;
31
32 std::unique_ptr<SkPngEncoderMgr> fEncoderMgr;
33 };
34 #endif