aboutsummaryrefslogtreecommitdiff
path: root/core/fxge/dib/scanlinecomposer_iface.h
blob: ef997cf97dda57e8624b24b03072e4532f273bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_
#define CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_

#include "core/fxge/dib/fx_dib.h"
#include "third_party/base/containers/span.h"

class ScanlineComposerIface {
 public:
  virtual ~ScanlineComposerIface() = default;

  virtual void ComposeScanline(int line,
                               pdfium::span<const uint8_t> scanline) = 0;

  // `src_format` cannot be `FXDIB_Format::k1bppMask` or
  // `FXDIB_Format::k1bppRgb`.
  virtual bool SetInfo(int width,
                       int height,
                       FXDIB_Format src_format,
                       pdfium::span<const uint32_t> src_palette) = 0;
};

#endif  // CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_