[Webkit-unassigned] [Bug 245664] New: [CG] A large PDFDocumentImage may be displayed pixelated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 26 01:30:17 PDT 2022


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

            Bug ID: 245664
           Summary: [CG] A large PDFDocumentImage may be displayed
                    pixelated
           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
                CC: sabouhallawa at apple.com

Drawing a sub-rectangle of PDFDocumentImage can be expensive because the whole image has to be displayed. PDFDocumentImage tries to cache a viewport of the last source displayed rectangle. The viewport is a bigger rectangle which includes the source rectangle. The goal of caching the viewport is to reuse it as many times as possible and not to draw the image itself. The calculations and the transformation to create, draw and reuse the viewport is very complex and fragile.

The solution is to clean up this code by introducing a new class called ImageViewport. This class will be responsible of creating a viewport ImageBuffer, drawing the source rectangle of the image to the viewport ImageBuffer and drawing this buffer to the destination GraphicsContext. The calculations can be simplified such that the resolution of the viewport ImageBuffer matches the effective resolution of the destination GraphicsContext.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220926/3cbb4654/attachment-0001.htm>


More information about the webkit-unassigned mailing list