diff options
author | weili <weili@chromium.org> | 2016-07-21 14:44:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-21 14:44:17 -0700 |
commit | c38cd6eb274429a5755e04d2e22a606375851717 (patch) | |
tree | 158c1e58b7d66a715cd7ba1459c55d329f08c49d /core/fxge/agg/fx_agg_driver.h | |
parent | 1d3348ce0092d6d2a40de5f8433c0d0c16a1e12e (diff) | |
download | pdfium-c38cd6eb274429a5755e04d2e22a606375851717.tar.xz |
Use smart pointers for graphics device classes
Use unique_ptr for class owned member variables. Also clean up some
style issues such as removing unused functions and casting to raw pointer.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2163103002
Diffstat (limited to 'core/fxge/agg/fx_agg_driver.h')
-rw-r--r-- | core/fxge/agg/fx_agg_driver.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h index 15f9706b3f..ff02ec7251 100644 --- a/core/fxge/agg/fx_agg_driver.h +++ b/core/fxge/agg/fx_agg_driver.h @@ -7,6 +7,9 @@ #ifndef CORE_FXGE_AGG_FX_AGG_DRIVER_H_ #define CORE_FXGE_AGG_FX_AGG_DRIVER_H_ +#include <memory> +#include <vector> + #include "core/fxge/include/ifx_renderdevicedriver.h" #include "third_party/agg23/agg_clip_liang_barsky.h" #include "third_party/agg23/agg_path_storage.h" @@ -108,11 +111,11 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { private: CFX_DIBitmap* m_pBitmap; - CFX_ClipRgn* m_pClipRgn; - CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack; + std::unique_ptr<CFX_ClipRgn> m_pClipRgn; + std::vector<std::unique_ptr<CFX_ClipRgn>> m_StateStack; +#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ void* m_pPlatformGraphics; - void* m_pPlatformBitmap; - void* m_pDwRenderTartget; +#endif int m_FillFlags; FX_BOOL m_bRgbByteOrder; CFX_DIBitmap* m_pOriDevice; |