#include <stdint.h>
#include <utility>
#include "build/build_config.h"
#include "core/fxcrt/check.h"
#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/dib/fx_dib.h"
#include "public/fpdf_progressive.h"
#include "testing/embedder_test.h"
#include "testing/embedder_test_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
constexpr FX_ARGB kBlack = …;
constexpr FX_ARGB kBlue = …;
constexpr FX_ARGB kGreen = …;
constexpr FX_ARGB kRed = …;
constexpr FX_ARGB kWhite = …;
const char* AnnotationStampWithApBaseContentChecksum() { … }
}
class FPDFProgressiveRenderEmbedderTest : public EmbedderTest { … };
bool FPDFProgressiveRenderEmbedderTest::StartRenderPage(FPDF_PAGE page,
IFSDK_PAUSE* pause) { … }
bool FPDFProgressiveRenderEmbedderTest::StartRenderPageWithFlags(
FPDF_PAGE page,
IFSDK_PAUSE* pause,
int flags) { … }
bool FPDFProgressiveRenderEmbedderTest::
StartRenderPageWithColorSchemeAndBackground(
FPDF_PAGE page,
IFSDK_PAUSE* pause,
int flags,
const FPDF_COLORSCHEME* color_scheme,
uint32_t background_color) { … }
bool FPDFProgressiveRenderEmbedderTest::ContinueRenderPage(FPDF_PAGE page,
IFSDK_PAUSE* pause) { … }
ScopedFPDFBitmap FPDFProgressiveRenderEmbedderTest::FinishRenderPage(
FPDF_PAGE page) { … }
ScopedFPDFBitmap FPDFProgressiveRenderEmbedderTest::FinishRenderPageWithForms(
FPDF_PAGE page,
FPDF_FORMHANDLE handle) { … }
ScopedFPDFBitmap
FPDFProgressiveRenderEmbedderTest::RenderPageWithForcedColorScheme(
FPDF_PAGE page,
FPDF_FORMHANDLE handle,
int flags,
const FPDF_COLORSCHEME* color_scheme,
FX_ARGB background_color) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderWithoutPause) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderWithPause) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderAnnotWithPause) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderFormsWithPause) { … }
void FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme(
int page_num,
int flags,
const FPDF_COLORSCHEME* color_scheme,
FX_ARGB background_color,
int bitmap_width,
int bitmap_height,
const char* md5) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderTextWithColorScheme) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderPathWithColorScheme) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest,
RenderPathWithColorSchemeAndConvertFillToStroke) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderHighlightWithColorScheme) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest,
RenderHighlightWithColorSchemeAndConvertFillToStroke) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderInkWithColorScheme) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderStampWithColorScheme) { … }
TEST_F(FPDFProgressiveRenderEmbedderTest, RenderFormWithColorScheme) { … }