| Summary: | [GPU Process] [iOS] REGRESSION(r293570): Snapshot rendering is not scaled with the device scale factor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||
| Component: | Layout and Rendering | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=239527 https://bugs.webkit.org/show_bug.cgi?id=225081 |
||||||
| Attachments: |
|
||||||
|
Description
Said Abou-Hallawa
2022-05-04 17:24:57 PDT
Created attachment 458839 [details]
Patch
Comment on attachment 458839 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458839&action=review > Source/WebCore/page/FrameSnapshotting.cpp:124 > - auto buffer = ImageBuffer::create(imageRect.size(), purpose, scaleFactor, options.colorSpace, options.pixelFormat, { }, { hostWindow }); > + auto buffer = ImageBuffer::create(scaledImageRect.size(), purpose, 1, options.colorSpace, options.pixelFormat, { }, { hostWindow }); It's odd that ImageBuffer::create() takes a scale factor argument, but apparently that doesn't behave the way we want? Comment on attachment 458839 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458839&action=review >> Source/WebCore/page/FrameSnapshotting.cpp:124 >> + auto buffer = ImageBuffer::create(scaledImageRect.size(), purpose, 1, options.colorSpace, options.pixelFormat, { }, { hostWindow }); > > It's odd that ImageBuffer::create() takes a scale factor argument, but apparently that doesn't behave the way we want? I think it is okay that we want the scaling of the ImageBuffer to happen at the creation time. And it is working for all the other backends. But there is a problem with ImageBufferShareableBitmapBackend which I can't figure it out so far. This patch is correct and it fixes the snapshot bug. But we do have a bug with creating scaled unaccelerated remote ImageBuffer which we never needed before. All the canvas ImageBuffers are not scaled and all the layer ImageBuffers are accelerated. So I will file another bug for this issue which can be fixed later. Committed r293825 (250298@main): <https://commits.webkit.org/250298@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458839 [details]. |