[Webkit-unassigned] [Bug 117211] New: [BlackBerry] LayerTiler fails to tile really big layers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 4 15:07:13 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=117211

           Summary: [BlackBerry] LayerTiler fails to tile really big
                    layers
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit BlackBerry
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: anilsson at rim.com
                CC: rwlbuis at gmail.com, jpetsovits at blackberry.com,
                    cgarcia at igalia.com, mlattanzio at blackberry.com,
                    anlo at rim.com
        Depends on: 117067


The reason is that LayerTiler computes which tiles are visible by exhaustively mapping every tile to normalized device coordinates and checking if it intersects the viewport. If there's a lot of tiles, it gets stuck in this loop, iterating over all tiles, for a very long time. Also, the visibility information is transferred to the WebKit thread using mutexes, which adds unnecessary mutex contention to the mix.

We can fix this by doing the reverse calculation, unprojecting the visible part of the layer to layer coordinate space to find which tiles are visible. We can use the w-coordinates of triangle vertices to perform "perspective correct texturing" of the intersection points, which is equivalent to unprojection since perspective correct texturing computes a 2D-coordinate in (normalized) layer coordinate space which is easily scaled up to the layer bounds and get the visible region expressed in layer coordinate space.

We approximate this visible area using a rectangle, and suddenly we have a much simpler representation of tile visibility. A set of tiles needing render are added to the layer visibility data structure, and suddenly we have a swappable data structure so visbility can be transferred to WebKit thread without mutexes, but instead using atomic swap.

This patch depends on the fix for bug #117067 to be landed before it can apply.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list