Title: [104804] trunk/Source/WebKit2
Revision
104804
Author
commit-qu...@webkit.org
Date
2012-01-12 03:10:28 -0800 (Thu, 12 Jan 2012)

Log Message

[EFL][WK2] Update and show ewk_view with updated webpage.
https://bugs.webkit.org/show_bug.cgi?id=76023

Patch by Eunmi Lee <eunmi15....@samsung.com> on 2012-01-12
Reviewed by Andreas Kling.

Update ewk_view with BackingStore image which is rendered webpage
image by WebProcess, and show updated image's area when
PageClientImpl::setViewNeedsDisplay() is called.
The ewk_view_display() function is used to display updated area of
evas_object_image and the ewk_view_image_data_set() function is used
to set evas_object_image's data with rendered webpage.

* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::setViewNeedsDisplay):
* UIProcess/API/efl/ewk_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_add):
(ewk_view_display):
(ewk_view_image_data_set):
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (104803 => 104804)


--- trunk/Source/WebKit2/ChangeLog	2012-01-12 10:56:52 UTC (rev 104803)
+++ trunk/Source/WebKit2/ChangeLog	2012-01-12 11:10:28 UTC (rev 104804)
@@ -1,3 +1,27 @@
+2012-01-12  Eunmi Lee  <eunmi15....@samsung.com>
+
+        [EFL][WK2] Update and show ewk_view with updated webpage.
+        https://bugs.webkit.org/show_bug.cgi?id=76023
+
+        Reviewed by Andreas Kling.
+
+        Update ewk_view with BackingStore image which is rendered webpage
+        image by WebProcess, and show updated image's area when
+        PageClientImpl::setViewNeedsDisplay() is called.
+        The ewk_view_display() function is used to display updated area of
+        evas_object_image and the ewk_view_image_data_set() function is used
+        to set evas_object_image's data with rendered webpage.
+
+        * UIProcess/API/efl/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::setViewNeedsDisplay):
+        * UIProcess/API/efl/ewk_private.h: Added.
+        * UIProcess/API/efl/ewk_view.cpp:
+        (ewk_view_add):
+        (ewk_view_display):
+        (ewk_view_image_data_set):
+        * UIProcess/cairo/BackingStoreCairo.cpp:
+        (WebKit::BackingStore::incorporateUpdate):
+
 2012-01-12  Ryuan Choi  <ryuan.c...@samsung.com>
 
         [EFL][WK2] Network is not available when SOUP is enabled.

Modified: trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp (104803 => 104804)


--- trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp	2012-01-12 10:56:52 UTC (rev 104803)
+++ trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp	2012-01-12 11:10:28 UTC (rev 104804)
@@ -32,6 +32,7 @@
 #include "WebContext.h"
 #include "WebContextMenuProxy.h"
 #include "WebPageProxy.h"
+#include "ewk_private.h"
 
 using namespace WebCore;
 
@@ -56,7 +57,7 @@
 
 void PageClientImpl::setViewNeedsDisplay(const WebCore::IntRect& rect)
 {
-    evas_object_image_data_update_add(m_viewWidget, rect.x(), rect.y(), rect.width(), rect.height());
+    ewk_view_display(m_viewWidget, rect);
 }
 
 void PageClientImpl::displayView()

Added: trunk/Source/WebKit2/UIProcess/API/efl/ewk_private.h (0 => 104804)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_private.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_private.h	2012-01-12 11:10:28 UTC (rev 104804)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef ewk_private_h
+#define ewk_private_h
+
+#include <Evas.h>
+
+namespace WebCore {
+class IntRect;
+class IntSize;
+}
+
+void ewk_view_display(Evas_Object* ewkView, const WebCore::IntRect& rect);
+void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const WebCore::IntSize& size);
+
+#endif // ewk_private_h

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (104803 => 104804)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-01-12 10:56:52 UTC (rev 104803)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-01-12 11:10:28 UTC (rev 104804)
@@ -479,7 +479,7 @@
         return 0;
     }
 
-    priv->pageClient = PageClientImpl::create(toImpl(contextRef), toImpl(pageGroupRef), smartData->image);
+    priv->pageClient = PageClientImpl::create(toImpl(contextRef), toImpl(pageGroupRef), ewkView);
 
     return ewkView;
 }
@@ -491,3 +491,23 @@
 
     return toAPI(priv->pageClient->page());
 }
+
+void ewk_view_display(Evas_Object* ewkView, const IntRect& rect)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    if (!smartData->image)
+        return;
+
+    evas_object_image_data_update_add(smartData->image, rect.x(), rect.y(), rect.width(), rect.height());
+}
+
+void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const IntSize& size)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    if (!imageData || !smartData->image)
+        return;
+
+    evas_object_resize(smartData->image, size.width(), size.height());
+    evas_object_image_size_set(smartData->image, size.width(), size.height());
+    evas_object_image_data_copy_set(smartData->image, imageData);
+}

Modified: trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp (104803 => 104804)


--- trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp	2012-01-12 10:56:52 UTC (rev 104803)
+++ trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp	2012-01-12 11:10:28 UTC (rev 104804)
@@ -33,6 +33,10 @@
 #include <WebCore/GraphicsContext.h>
 #include <cairo/cairo.h>
 
+#if PLATFORM(EFL)
+#include "ewk_private.h"
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -64,6 +68,11 @@
         srcRect.move(-updateRectLocation.x(), -updateRectLocation.y());
         bitmap->paint(graphicsContext, updateRect.location(), srcRect);
     }
+
+#if PLATFORM(EFL)
+    // Update ewk_view with new backingStore image.
+    ewk_view_image_data_set(m_webPageProxy->viewWidget(), cairo_image_surface_get_data(m_backingStore->cairoSurface()), m_size);
+#endif
 }
 
 void BackingStore::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to