summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_devicebuffer.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-23 17:21:01 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 16:41:29 +0000
commit08f4b7762a4453818c76c680f5295986e21418ce (patch)
treec6a771759b639180add570f4dd882d103f8efe9c /core/fpdfapi/render/cpdf_devicebuffer.cpp
parent129b0135adf99be8e2c3015267a4689c6d62dca1 (diff)
downloadpdfium-08f4b7762a4453818c76c680f5295986e21418ce.tar.xz
Convert to CFX_UnownedPtr, part 4.
Fix strange ownership issue in cpdf_type3char.cpp, and describe the absolutely insane stuff happening there. Change-Id: Iae70f9eca8f125ed3ef677729f1776ba9f10183c Reviewed-on: https://pdfium-review.googlesource.com/5830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_devicebuffer.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_devicebuffer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp
index be87128a49..8125ea5df1 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.cpp
+++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp
@@ -14,8 +14,7 @@
#include "core/fxge/fx_dib.h"
#include "third_party/base/ptr_util.h"
-CPDF_DeviceBuffer::CPDF_DeviceBuffer()
- : m_pDevice(nullptr), m_pContext(nullptr), m_pObject(nullptr) {}
+CPDF_DeviceBuffer::CPDF_DeviceBuffer() {}
CPDF_DeviceBuffer::~CPDF_DeviceBuffer() {}
@@ -68,7 +67,7 @@ void CPDF_DeviceBuffer::OutputToDevice() {
auto pBuffer = pdfium::MakeRetain<CFX_DIBitmap>();
m_pDevice->CreateCompatibleBitmap(pBuffer, m_pBitmap->GetWidth(),
m_pBitmap->GetHeight());
- m_pContext->GetBackground(pBuffer, m_pObject, nullptr, &m_Matrix);
+ m_pContext->GetBackground(pBuffer, m_pObject.Get(), nullptr, &m_Matrix);
pBuffer->CompositeBitmap(0, 0, pBuffer->GetWidth(), pBuffer->GetHeight(),
m_pBitmap, 0, 0);
m_pDevice->StretchDIBits(pBuffer, m_Rect.left, m_Rect.top, m_Rect.Width(),