summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/cfx_renderdevice.cpp9
-rw-r--r--core/fxge/cfx_renderdevice.h2
-rw-r--r--core/fxge/skia/fx_skia_device.cpp2
3 files changed, 8 insertions, 5 deletions
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index 407c090c73..279e720d1e 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -375,13 +375,16 @@ CFX_RenderDevice::CFX_RenderDevice()
CFX_RenderDevice::~CFX_RenderDevice() {
RestoreState(false);
#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
- Flush();
+ Flush(true);
#endif
}
#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
-void CFX_RenderDevice::Flush() {
- m_pDeviceDriver.reset();
+void CFX_RenderDevice::Flush(bool release) {
+ if (release)
+ m_pDeviceDriver.reset();
+ else
+ m_pDeviceDriver->Flush();
}
#endif
diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h
index ef15718d58..ad8e487749 100644
--- a/core/fxge/cfx_renderdevice.h
+++ b/core/fxge/cfx_renderdevice.h
@@ -274,7 +274,7 @@ class CFX_RenderDevice {
int blend_type);
#endif
#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
- void Flush();
+ void Flush(bool release);
#endif
private:
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 855699a4be..523c8a28e8 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -2595,7 +2595,7 @@ bool CFX_DefaultRenderDevice::Create(
}
CFX_DefaultRenderDevice::~CFX_DefaultRenderDevice() {
- Flush();
+ Flush(true);
}
#ifdef _SKIA_SUPPORT_