From 73b607fcb5f904893a0610b2c7fb8726d09379e6 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 24 Mar 2017 12:26:38 -0400 Subject: Fix CFX_FxgeDevice constructor and destructor in Skia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Nicolás Peña --- core/fxge/skia/fx_skia_device.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/fxge') 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_ -- cgit v1.2.3