summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-03-24 12:26:38 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-24 16:45:25 +0000
commit73b607fcb5f904893a0610b2c7fb8726d09379e6 (patch)
tree6f072eb609f444a8da09524104fc763fc551e68d /core/fxge
parent1a89e3691b320b2e577dad8e4617be6356545396 (diff)
downloadpdfium-73b607fcb5f904893a0610b2c7fb8726d09379e6.tar.xz
Fix CFX_FxgeDevice constructor and destructor in Skia
Attach and Create methods may be called without _SKIA_SUPPORT_, so the bitmap ownership code can't be if def'd to _SKIA_SUPPORT_. Bug:chromium:704835 Change-Id: If6a7da508156ca3c45898bf101d84dd8295e479f Reviewed-on: https://pdfium-review.googlesource.com/3210 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 8987b33ae4..1071f85a3b 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -2153,9 +2153,7 @@ void CFX_SkiaDeviceDriver::DebugVerifyBitmapIsPreMultiplied() const {
#endif // _SKIA_SUPPORT_
CFX_FxgeDevice::CFX_FxgeDevice() {
-#ifdef _SKIA_SUPPORT_
m_bOwnedBitmap = false;
-#endif // _SKIA_SUPPORT_
}
#ifdef _SKIA_SUPPORT_
@@ -2212,10 +2210,10 @@ bool CFX_FxgeDevice::Create(int width,
CFX_FxgeDevice::~CFX_FxgeDevice() {
#ifdef _SKIA_SUPPORT_
Flush();
+#endif // _SKIA_SUPPORT_
// call destructor of CFX_RenderDevice / CFX_SkiaDeviceDriver immediately
if (m_bOwnedBitmap && GetBitmap())
delete GetBitmap();
-#endif // _SKIA_SUPPORT_
}
#ifdef _SKIA_SUPPORT_