Delete unused ProgressiveDecoder::SetClipBox()
It has no callers.
Change-Id: Ie075cfc577398ae32a5d548b1c9597bd0e974238
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/122231
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@google.com>
diff --git a/core/fxcodec/progressive_decoder.cpp b/core/fxcodec/progressive_decoder.cpp
index 0613012..a59c1ec 100644
--- a/core/fxcodec/progressive_decoder.cpp
+++ b/core/fxcodec/progressive_decoder.cpp
@@ -1575,25 +1575,6 @@
return m_status;
}
-void ProgressiveDecoder::SetClipBox(FX_RECT* clip) {
- if (m_status != FXCODEC_STATUS::kFrameReady)
- return;
-
- if (clip->IsEmpty()) {
- m_clipBox = FX_RECT();
- return;
- }
- clip->left = std::max(clip->left, 0);
- clip->right = std::min(clip->right, m_SrcWidth);
- clip->top = std::max(clip->top, 0);
- clip->bottom = std::min(clip->bottom, m_SrcHeight);
- if (clip->IsEmpty()) {
- m_clipBox = FX_RECT();
- return;
- }
- m_clipBox = *clip;
-}
-
int ProgressiveDecoder::GetDownScale() {
int down_scale = 1;
int ratio_w = m_clipBox.Width() / m_sizeX;
diff --git a/core/fxcodec/progressive_decoder.h b/core/fxcodec/progressive_decoder.h
index 78153fc..420de37 100644
--- a/core/fxcodec/progressive_decoder.h
+++ b/core/fxcodec/progressive_decoder.h
@@ -80,7 +80,6 @@
int32_t GetWidth() const { return m_SrcWidth; }
int32_t GetHeight() const { return m_SrcHeight; }
int32_t GetBitsPerPixel() const { return m_SrcComponents * m_SrcBPC; }
- void SetClipBox(FX_RECT* clip);
std::pair<FXCODEC_STATUS, size_t> GetFrames();
FXCODEC_STATUS StartDecode(RetainPtr<CFX_DIBitmap> bitmap);