#include "core/fxge/dib/cfx_scanlinecompositor.h"
#include <stdint.h>
#include <array>
#include "core/fxcrt/span.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxge/dib/fx_dib.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
ElementsAreArray;
namespace {
constexpr FX_BGRA_STRUCT<uint8_t> kDestScan[] = …;
constexpr FX_BGRA_STRUCT<uint8_t> kSrcScan1[] = …;
constexpr FX_BGRA_STRUCT<uint8_t> kSrcScan2[] = …;
constexpr FX_BGRA_STRUCT<uint8_t> kSrcScan3[] = …;
void RunTest(CFX_ScanlineCompositor& compositor,
pdfium::span<const FX_BGRA_STRUCT<uint8_t>> src_span,
pdfium::span<const FX_BGRA_STRUCT<uint8_t>> expectations) { … }
#if defined(PDF_USE_SKIA)
void PreMultiplyScanLine(pdfium::span<FX_BGRA_STRUCT<uint8_t>> scanline) { … }
void UnPreMultiplyScanLine(pdfium::span<FX_BGRA_STRUCT<uint8_t>> scanline) { … }
void RunPreMultiplyTest(
CFX_ScanlineCompositor& compositor,
pdfium::span<const FX_BGRA_STRUCT<uint8_t>> src_span,
pdfium::span<const FX_BGRA_STRUCT<uint8_t>> expectations) { … }
#endif
}
inline bool operator==(const FX_BGRA_STRUCT<uint8_t>& lhs,
const FX_BGRA_STRUCT<uint8_t>& rhs) { … }
TEST(ScanlineCompositorTest, CompositeRgbBitmapLineBgraNormal) { … }
TEST(ScanlineCompositorTest, CompositeRgbBitmapLineBgraDarken) { … }
TEST(ScanlineCompositorTest, CompositeRgbBitmapLineBgraHue) { … }
#if defined(PDF_USE_SKIA)
TEST(ScanlineCompositorTest, CompositeRgbBitmapLineBgraPremulNormal) { … }
TEST(ScanlineCompositorTest, CompositeRgbBitmapLineBgraPremulDarken) { … }
TEST(ScanlineCompositorTest, CompositeRgbBitmapLineBgraPremulHue) { … }
#endif