WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
245664
[CG] A large PDFDocumentImage may be displayed pixelated
https://bugs.webkit.org/show_bug.cgi?id=245664
Summary
[CG] A large PDFDocumentImage may be displayed pixelated
Said Abou-Hallawa
Reported
2022-09-26 01:30:17 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2022-09-26 01:30:44 PDT
rdar://97254192
Said Abou-Hallawa
Comment 2
2022-09-26 02:07:40 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/4700
EWS
Comment 3
2023-02-06 17:17:55 PST
Committed
259928@main
(8382d4d3c6e3): <
https://commits.webkit.org/259928@main
> Reviewed commits have been landed. Closing PR #4700 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug