[WK2] fix the issue about low memory handling for OSP.
authorJungJik Lee <jungjik.lee@samsung.com>
Wed, 5 Jun 2013 06:53:35 +0000 (15:53 +0900)
committerJungJik Lee <jungjik.lee@samsung.com>
Wed, 19 Jun 2013 05:03:09 +0000 (14:03 +0900)
[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

Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/efl/WebContextEfl.cpp
Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp

index 4c10e19..c0f47e3 100755 (executable)
@@ -555,9 +555,6 @@ public:
 #endif
 
     void suspendPainting();
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    void suspendPaintingOfInactiveView();
-#endif
     void resumePainting();
 
     void suspendJavaScriptAndResource();
@@ -568,6 +565,10 @@ public:
     void resumePlugin();
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+    void purgeBackingStoresOfInactiveView();
+#endif
+
 #endif // #if OS(TIZEN)
 
 #if USE(TILED_BACKING_STORE)
index 06638eb..ecd645b 100644 (file)
@@ -574,7 +574,7 @@ void WebProcessProxy::releaseBackingStoreMemory()
     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
index 2eb1277..7529466 100755 (executable)
@@ -143,11 +143,12 @@ void WebContext::setCertificateFile(const String& certificateFile)
 
 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)
index eb778d4..04de27b 100755 (executable)
@@ -608,16 +608,6 @@ void WebPageProxy::suspendPainting()
     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())
@@ -660,6 +650,16 @@ void WebPageProxy::resumePlugin()
 }
 #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)
 {