[WK2] call ewkViewFrameRendered after nonempty layout finished.
authorJungJik Lee <jungjik.lee@samsung.com>
Mon, 27 May 2013 10:57:03 +0000 (19:57 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 1 Jul 2013 02:47:43 +0000 (02:47 +0000)
[Title] [WK2] call ewkViewFrameRendered after nonempty layout finished.
[Issue#] PLM 130509-5589
[Problem] Livebox / a PD box is bliking when the webview is created.
[Cause] the client does not know when the actual rendering is started.
[Solution] Send "frame,rendered" message to the client
           after didFirstVisuallyNonEmptyLayoutForMainFrame is called.

Change-Id: I4360758c6e9304f7756315cc885b2854be258dac

Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp

index faadbdb..8583168 100755 (executable)
@@ -116,6 +116,10 @@ PageClientImpl::PageClientImpl(EwkViewImpl* viewImpl)
 #if ENABLE(TIZEN_PRERENDERING_FOR_ROTATION)
     , m_waitFrameOfNewViewortSize(false)
 #endif
+#if ENABLE(TIZEN_BACKGROUND_DISK_CACHE)
+    , m_isForeground(true)
+#endif
+    , m_nonemptyLayoutRendered(false)
 #endif // #if OS(TIZEN)
 {
 #if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING)
@@ -664,6 +668,7 @@ void PageClientImpl::didChangeScrollbarsForMainFrame() const
 #if OS(TIZEN)
 void PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame()
 {
+    m_nonemptyLayoutRendered = true;
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE_BACKUP_IMAGE)
     m_initialViewRect.setSize(viewSize());
 #endif
@@ -724,6 +729,7 @@ void PageClientImpl::didCommitLoadForMainFrame(bool)
 #if OS(TIZEN)
     m_pageDidRendered = false;
     m_viewportFitsToContent = false;
+    m_nonemptyLayoutRendered = false;
     return;
 #endif
     notImplemented();
@@ -1388,6 +1394,11 @@ void PageClientImpl::unlockOrientation()
 
 void PageClientImpl::didRenderFrame()
 {
+#if OS(TIZEN)
+    if (m_nonemptyLayoutRendered)
+        ewkViewFrameRendered(m_viewImpl->view());
+#endif
+
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE_BACKUP_IMAGE)
     if (m_shouldShowBackupTexture && m_isVisible)
         m_shouldShowBackupTexture = false;
@@ -1593,7 +1604,6 @@ void PageClientEvasGL::drawContents()
 
 void PageClientEvasGL::didRenderFrame()
 {
-    ewkViewFrameRendered(m_viewImpl->view());
     PageClientImpl::didRenderFrame();
 }
 
index 20f8866..c77d3d3 100755 (executable)
@@ -468,6 +468,7 @@ protected:
     bool m_waitFrameOfNewViewortSize;
 #endif
 
+    bool m_nonemptyLayoutRendered;
 #endif // #if OS(TIZEN)
 };
 
index 8fd0b06..9a9be26 100644 (file)
@@ -2568,8 +2568,6 @@ static Eina_Bool _ewk_view_composite(void* data)
     evas_object_image_data_set(smartData->image, pixels);
     evas_object_image_data_update_add(smartData->image, 0, 0, ow, oh);
 
-    ewkViewFrameRendered(smartData->self);
-
     impl->compositionAnimator = 0;
 
     return ECORE_CALLBACK_CANCEL;