#include "core/fxge/dib/cfx_imagestretcher.h"
#include <utility>
#include "core/fxcrt/check.h"
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/data_vector.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/span.h"
#include "core/fxge/dib/cfx_dibbase.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/cstretchengine.h"
#include "core/fxge/dib/fx_dib.h"
namespace {
const int kMaxProgressiveStretchPixels = …;
bool SourceSizeWithinLimit(int width, int height) { … }
FXDIB_Format GetStretchedFormat(const CFX_DIBBase& src) { … }
DataVector<uint32_t> BuildPaletteFrom1BppSource(
const RetainPtr<const CFX_DIBBase>& source) { … }
}
CFX_ImageStretcher::CFX_ImageStretcher(ScanlineComposerIface* pDest,
RetainPtr<const CFX_DIBBase> source,
int dest_width,
int dest_height,
const FX_RECT& bitmap_rect,
const FXDIB_ResampleOptions& options)
: … { … }
CFX_ImageStretcher::~CFX_ImageStretcher() = default;
bool CFX_ImageStretcher::Start() { … }
bool CFX_ImageStretcher::Continue(PauseIndicatorIface* pPause) { … }
RetainPtr<const CFX_DIBBase> CFX_ImageStretcher::source() { … }
bool CFX_ImageStretcher::StartStretch() { … }
bool CFX_ImageStretcher::ContinueStretch(PauseIndicatorIface* pPause) { … }