[Webkit-unassigned] [Bug 169473] New: REGRESSION(r213618): Large async image decoding should only be requested at the time the BitmapImage is drawn

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 10 09:31:56 PST 2017


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

            Bug ID: 169473
           Summary: REGRESSION(r213618): Large async image decoding should
                    only be requested at the time the BitmapImage is drawn
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Images
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com

In <http://trac.webkit.org/changeset/213618>, the large async image decoding was requested for all the images in the tileCoverageRect of the tileGrid. This turned out to be inefficient approach because tileCoverageRect represents the rectangle from the page that should be cached in tiles. This rectangle includes dirty and clean rectangles. But when requesting the async image decoding, we enumerate all the images in tileCoverageRect regardless whether they are in dirty rects, i.e. they are going to be drawn. Or they are in clean rects, i.e. they are not going to be drawn.

This causes more CPU to be wasted needlessly. And more importantly a memory regression due to aggressive async decoding for images which are not going to be drawn. These images were drawn on tiles and those tiles were kept clean so their frames were destroyed by the MemoryCache to keep the memory under control. But requesting the async decoding for those images, bring their frames back to memory.

The fix is to request the async image decoding only at the time that a BitmapImage is drawn. This is the time that we are sure, a BitmapImage needs to be drawn. It also fixes the scaling and transformation that we need to apply to sizeForDrawing since all of them have to be applied to the GraphicsContext.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170310/c8dcdd5f/attachment.html>


More information about the webkit-unassigned mailing list