summaryrefslogtreecommitdiff
path: root/core/src/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-09 16:39:40 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-09 16:39:40 -0800
commitbd573f126f93acc2034be2df1c6f571670f76c35 (patch)
treebeeea3b9370bb7490ed5933dadbef857cb8df23d /core/src/fxge
parente021e084717b8cc43f8a0667ad9d1a807dfe381c (diff)
downloadpdfium-bd573f126f93acc2034be2df1c6f571670f76c35.tar.xz
Merge to XFA: Get rid of most uses of CFX_PtrArray.
Original Review URL: https://codereview.chromium.org/1518593002 . (cherry picked from commit 035359cd8ddb555fa33b6133db4fd405e4660712) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1513103002 .
Diffstat (limited to 'core/src/fxge')
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h2
-rw-r--r--core/src/fxge/agg/src/fx_agg_driver.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index 77d2f2af6e..0e79a3fc5e 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -137,7 +137,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
CFX_DIBitmap* m_pBitmap;
CFX_ClipRgn* m_pClipRgn;
- CFX_PtrArray m_StateStack;
+ CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack;
void* m_pPlatformGraphics;
void* m_pPlatformBitmap;
void* m_pDwRenderTartget;
diff --git a/core/src/fxge/agg/src/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp
index 78186a8f96..4b3389bb4c 100644
--- a/core/src/fxge/agg/src/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/src/fx_agg_driver.cpp
@@ -211,7 +211,7 @@ CFX_AggDeviceDriver::CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap,
CFX_AggDeviceDriver::~CFX_AggDeviceDriver() {
delete m_pClipRgn;
for (int i = 0; i < m_StateStack.GetSize(); i++)
- delete (CFX_ClipRgn*)m_StateStack[i];
+ delete m_StateStack[i];
DestroyPlatform();
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
@@ -266,7 +266,7 @@ int CFX_AggDeviceDriver::GetDeviceCaps(int caps_id) {
return 0;
}
void CFX_AggDeviceDriver::SaveState() {
- void* pClip = NULL;
+ CFX_ClipRgn* pClip = NULL;
if (m_pClipRgn) {
pClip = new CFX_ClipRgn(*m_pClipRgn);
}
@@ -278,8 +278,7 @@ void CFX_AggDeviceDriver::RestoreState(FX_BOOL bKeepSaved) {
m_pClipRgn = NULL;
return;
}
- CFX_ClipRgn* pSavedClip =
- (CFX_ClipRgn*)m_StateStack[m_StateStack.GetSize() - 1];
+ CFX_ClipRgn* pSavedClip = m_StateStack[m_StateStack.GetSize() - 1];
delete m_pClipRgn;
m_pClipRgn = NULL;
if (bKeepSaved) {