[webkit-dev] Webkit over DirectFB: Moving cursor over links snow balls the display <SOLVED>

Pratheesh Gangadhar pratheesh.gangadhar at gmail.com
Fri Oct 10 16:04:06 PDT 2008


On Mon, Oct 6, 2008 at 7:36 PM, Pratheesh Gangadhar <
pratheesh.gangadhar at gmail.com> wrote:

> Hi,
>
> I am able to run webkit over directfb backend - using GtkLauncher and
> Midori browser. The problem I face is that when I open say cnn.com using
> this browser and move the cursor over links; it results in neighboring links
> to disappear - kind of a snow balling effect. I have tried same build using
> Kdrive - it seems to work fine.
>
> Any ideas where to look to fix this issue ?
>
> I have tested cross compiled version on target platform and native build on
> PC (using SDL), both show up the same problem.
>
> I am using folowing version of packages and running DirectFB without any
> acceleration on my target.
>
> DirectFB-1.2.0
> pixman-0.10.0
> cairo-1.6.4
> pango-1.18.3
> gtk+-2.12.9 with patches mentioned (
> https://wiki.mozilla.org/Mobile/DFBPorting)
>
>
> This issue is fixed by applying gtk+ rendering improvement patch (
https://bugs.webkit.org/show_bug.cgi?id=21303) from Alp Toker over Webkit
nighly build tar ball (WebKit-r37469). Thanks for the patch.

Index: WebKit/gtk/webkit/webkitwebview.cpp
===================================================================
--- WebKit/gtk/webkit/webkitwebview.cpp	(revision 37221)
+++ WebKit/gtk/webkit/webkitwebview.cpp	(working copy)

@@ -282,8 +282,6 @@ static gboolean webkit_web_view_expose_e
     WebKitWebViewPrivate* priv = webView->priv;

     Frame* frame = core(webView)->mainFrame();
-    GdkRectangle clip;
-    gdk_region_get_clipbox(event->region, &clip);

     cairo_t* cr = gdk_cairo_create(event->window);
     GraphicsContext ctx(cr);
     ctx.setGdkExposeEvent(event);
@@ -297,8 +295,28 @@ static gboolean webkit_web_view_expose_e
             cairo_restore(cr);

         }

-        frame->view()->paint(&ctx, clip);
+        GdkRectangle* rects = NULL;
+        int n_rects = 0;
+        gdk_region_get_rectangles(event->region, &rects, &n_rects);

+
+        // Avoid recursing into the render tree excessively
+        if (n_rects > 16) {
+            IntRect clip = event->area;
+            ctx.clip(clip);
+            frame->view()->paint(&ctx, clip);

+        } else {
+            for (int i = 0; i < n_rects; i++) {
+                IntRect rect = rects[i];
+                ctx.save();
+                ctx.clip(rect);
+                frame->view()->paint(&ctx, rect);

+                ctx.restore();
+            }
+        }
+
+        g_free(rects);
     }
+
     cairo_destroy(cr);


     return FALSE;

Regards,
Pratheesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20081011/2e04a6d8/attachment.html 


More information about the webkit-dev mailing list