Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2145)

Unified Diff: core/fxge/ge/cfx_renderdevice.cpp

Issue 2546803003: re-enable skia caching (Closed)
Patch Set: remove nullptr Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/cfx_renderdevice.h ('k') | core/fxge/ifx_renderdevicedriver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/cfx_renderdevice.cpp
diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp
index 64fa6ff452a73d10d2811f5e5dbd35b29b8e961e..9c67a7d1e791991c815e768fbd5282acd05ceda4 100644
--- a/core/fxge/ge/cfx_renderdevice.cpp
+++ b/core/fxge/ge/cfx_renderdevice.cpp
@@ -354,9 +354,13 @@ CFX_RenderDevice::CFX_RenderDevice()
m_RenderCaps(0),
m_DeviceClass(0) {}
-CFX_RenderDevice::~CFX_RenderDevice() {}
+CFX_RenderDevice::~CFX_RenderDevice() {
+#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
+ Flush();
+#endif
+}
-#ifdef _SKIA_SUPPORT_
+#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
void CFX_RenderDevice::Flush() {
m_pDeviceDriver.reset();
}
@@ -615,6 +619,9 @@ bool CFX_RenderDevice::DrawFillStrokePath(const CFX_PathData* pPathData,
blend_type)) {
return false;
}
+#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
+ bitmap_device.GetDeviceDriver()->Flush();
+#endif
FX_RECT src_rect(0, 0, FXSYS_round(rect.Width() * fScaleX),
FXSYS_round(rect.Height() * fScaleY));
return m_pDeviceDriver->SetDIBits(&bitmap, 0, &src_rect, rect.left, rect.top,
« no previous file with comments | « core/fxge/cfx_renderdevice.h ('k') | core/fxge/ifx_renderdevicedriver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698