xref: /aosp_15_r20/external/pdfium/core/fxge/dib/scanlinecomposer_iface.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2017 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_
8 #define CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_
9 
10 #include "core/fxge/dib/fx_dib.h"
11 #include "third_party/base/containers/span.h"
12 
13 class ScanlineComposerIface {
14  public:
15   virtual ~ScanlineComposerIface() = default;
16 
17   virtual void ComposeScanline(int line,
18                                pdfium::span<const uint8_t> scanline) = 0;
19 
20   // `src_format` cannot be `FXDIB_Format::k1bppMask` or
21   // `FXDIB_Format::k1bppRgb`.
22   virtual bool SetInfo(int width,
23                        int height,
24                        FXDIB_Format src_format,
25                        pdfium::span<const uint32_t> src_palette) = 0;
26 };
27 
28 #endif  // CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_
29