[Title] [WK2] fix the issue about low memory handling for OSP.
[Issue#] N/A
[Problem] due to the previous implementation for OSP, it causes the suspend painting in PlatformSurface WebKit.
[Cause] After getting the low memory noti, the browser does not render any frame.
[Solution] the implementation works only on OSP and purges the backing stores when the low memory notification comes.
Change-Id: Ibb8e0efed4e12b2a6e49b701d9b650e0b13cc4ce
#endif
void suspendPainting();
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
- void suspendPaintingOfInactiveView();
-#endif
void resumePainting();
void suspendJavaScriptAndResource();
void resumePlugin();
#endif
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+ void purgeBackingStoresOfInactiveView();
+#endif
+
#endif // #if OS(TIZEN)
#if USE(TILED_BACKING_STORE)
Vector<RefPtr<WebPageProxy> > pages;
copyValuesToVector(m_pageMap, pages);
for (size_t i = 0, size = pages.size(); i < size; ++i)
- pages[i]->suspendPaintingOfInactiveView();
+ pages[i]->purgeBackingStoresOfInactiveView();
}
#endif
} // namespace WebKit
void WebContext::notifyLowMemory()
{
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+ m_process->platformSurfaceTexturePool()->removeUnusedPlatformSurfaceTextures(m_process.get());
+#else
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
m_process->releaseBackingStoreMemory();
#endif
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
- m_process->platformSurfaceTexturePool()->removeUnusedPlatformSurfaceTextures(m_process.get());
#endif
}
#if ENABLE(TIZEN_SOUP_COOKIE_CACHE_FOR_WEBKIT2)
process()->send(Messages::DrawingArea::SuspendPainting(), m_pageID);
}
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-void WebPageProxy::suspendPaintingOfInactiveView()
-{
- if (!isValid() || isViewVisible())
- return;
-
- process()->send(Messages::DrawingArea::SuspendPainting(), m_pageID);
-}
-#endif
-
void WebPageProxy::resumePainting()
{
if (!isValid())
}
#endif
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+void WebPageProxy::purgeBackingStoresOfInactiveView()
+{
+ if (!isValid() || isViewVisible())
+ return;
+
+ process()->send(Messages::LayerTreeCoordinator::PurgeBackingStores(), m_pageID);
+}
+#endif
+
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
bool WebPageProxy::scrollOverflow(const FloatPoint& offset)
{