summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_devicebuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render/cpdf_devicebuffer.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_devicebuffer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp
index 8125ea5df1..b632dee49d 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.cpp
+++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp
@@ -45,10 +45,8 @@ bool CPDF_DeviceBuffer::Initialize(CPDF_RenderContext* pContext,
CFX_Matrix ctm = m_pDevice->GetCTM();
m_Matrix.Concat(CFX_Matrix(fabs(ctm.a), 0, 0, fabs(ctm.d), 0, 0));
- CFX_FloatRect rect(*pRect);
- m_Matrix.TransformRect(rect);
-
- FX_RECT bitmap_rect = rect.GetOuterRect();
+ FX_RECT bitmap_rect =
+ m_Matrix.TransformRect(CFX_FloatRect(*pRect)).GetOuterRect();
m_pBitmap = pdfium::MakeRetain<CFX_DIBitmap>();
m_pBitmap->Create(bitmap_rect.Width(), bitmap_rect.Height(), FXDIB_Argb);
return true;