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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp
index 7dfa497b5c..def2c2c7ca 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.cpp
+++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp
@@ -21,14 +21,14 @@ CPDF_DeviceBuffer::~CPDF_DeviceBuffer() {}
bool CPDF_DeviceBuffer::Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice,
- FX_RECT* pRect,
+ const FX_RECT& rect,
const CPDF_PageObject* pObj,
int max_dpi) {
m_pDevice = pDevice;
m_pContext = pContext;
- m_Rect = *pRect;
+ m_Rect = rect;
m_pObject = pObj;
- m_Matrix.Translate(-pRect->left, -pRect->top);
+ m_Matrix.Translate(-rect.left, -rect.top);
#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
int horz_size = pDevice->GetDeviceCaps(FXDC_HORZ_SIZE);
int vert_size = pDevice->GetDeviceCaps(FXDC_VERT_SIZE);
@@ -44,7 +44,7 @@ bool CPDF_DeviceBuffer::Initialize(CPDF_RenderContext* pContext,
}
#endif
FX_RECT bitmap_rect =
- m_Matrix.TransformRect(CFX_FloatRect(*pRect)).GetOuterRect();
+ m_Matrix.TransformRect(CFX_FloatRect(rect)).GetOuterRect();
m_pBitmap = pdfium::MakeRetain<CFX_DIBitmap>();
m_pBitmap->Create(bitmap_rect.Width(), bitmap_rect.Height(), FXDIB_Argb);
return true;