[Webkit-unassigned] [Bug 240100] New: [GPU Process] [iOS] REGRESSION(r293570): Snapshot rendering is not scaled with the device scale factor
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 4 17:24:57 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=240100
Bug ID: 240100
Summary: [GPU Process] [iOS] REGRESSION(r293570): Snapshot
rendering is not scaled with the device scale factor
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sabouhallawa at apple.com
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
In r293570, the GPU Process was enabled for snapshot images. Before r293570, a local ImageBuffer was created in snapshotFrameRectWithClip(). Then in WebFrame::createSelectionSnapshot(), the pixels of the ImageBuffer were copied to a WebImage, which was backed by a ShareableBitmap.
r293570 made snapshotFrameRectWithClip() create a remote ImageBuffer which is moved to a WebImage in WebFrame::createSelectionSnapshot(). This remote ImageBuffer has to have ImageBufferShareableBitmapBackend so it can provide ShareableBitmap without allocating any extra memory.
The problem is in initializing the GraphicsContext of ImageBufferShareableBitmapBackend. The scaling factor is not set to the CTM of the ImageBufferShareableBitmapBackend context. See the comment in ImageBufferShareableBitmapBackend constructor and notice that this function does not call applyBaseTransformToContext().
A simple approach to fix this bug is to make snapshotFrameRectWithClip() handle the scaling outside the ImageBuffer creation. This is similar to what we do in GraphicsContext::createAlignedImageBuffer() where we scale the size and create the ImageBuffer with scaleFactor = 1.
--
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/20220505/1c96d5dc/attachment-0001.htm>
More information about the webkit-unassigned
mailing list