• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/fxcrt/data_vector.h"
11 #include "core/fxcrt/span.h"
12 #include "core/fxge/dib/fx_dib.h"
13 
14 class ScanlineComposerIface {
15  public:
16   virtual ~ScanlineComposerIface() = default;
17 
18   virtual void ComposeScanline(int line,
19                                pdfium::span<const uint8_t> scanline) = 0;
20 
21   // `src_format` cannot be `FXDIB_Format::k1bppMask` or
22   // `FXDIB_Format::k1bppRgb`.
23   virtual bool SetInfo(int width,
24                        int height,
25                        FXDIB_Format src_format,
26                        DataVector<uint32_t> src_palette) = 0;
27 };
28 
29 #endif  // CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_
30