diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-23 17:21:01 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-24 16:41:29 +0000 |
commit | 08f4b7762a4453818c76c680f5295986e21418ce (patch) | |
tree | c6a771759b639180add570f4dd882d103f8efe9c /core/fpdfapi/render/cpdf_devicebuffer.h | |
parent | 129b0135adf99be8e2c3015267a4689c6d62dca1 (diff) | |
download | pdfium-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.h')
-rw-r--r-- | core/fpdfapi/render/cpdf_devicebuffer.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.h b/core/fpdfapi/render/cpdf_devicebuffer.h index 61cdc9776b..bfab27503b 100644 --- a/core/fpdfapi/render/cpdf_devicebuffer.h +++ b/core/fpdfapi/render/cpdf_devicebuffer.h @@ -9,6 +9,8 @@ #include <memory> +#include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_coordinates.h" class CFX_DIBitmap; @@ -20,6 +22,7 @@ class CPDF_DeviceBuffer { public: CPDF_DeviceBuffer(); ~CPDF_DeviceBuffer(); + bool Initialize(CPDF_RenderContext* pContext, CFX_RenderDevice* pDevice, FX_RECT* pRect, @@ -30,11 +33,11 @@ class CPDF_DeviceBuffer { const CFX_Matrix* GetMatrix() const { return &m_Matrix; } private: - CFX_RenderDevice* m_pDevice; - CPDF_RenderContext* m_pContext; - FX_RECT m_Rect; - const CPDF_PageObject* m_pObject; + CFX_UnownedPtr<CFX_RenderDevice> m_pDevice; + CFX_UnownedPtr<CPDF_RenderContext> m_pContext; + CFX_UnownedPtr<const CPDF_PageObject> m_pObject; CFX_RetainPtr<CFX_DIBitmap> m_pBitmap; + FX_RECT m_Rect; CFX_Matrix m_Matrix; }; |