| Summary: | [GPU Process] Can't getImageData on canvas larger than 4096x4096 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||||||
| Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, thorton, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=235169 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Myles C. Maxfield
2021-12-14 15:44:23 PST
Created attachment 447170 [details]
Patch
Looks like iOS needs a different policy than macOS. static inline size_t maxCanvasArea()
{
if (maxCanvasAreaForTesting)
return *maxCanvasAreaForTesting;
// Firefox limits width/height to 32767 pixels, but slows down dramatically before it
// reaches that limit. We limit by area instead, giving us larger maximum dimensions,
// in exchange for a smaller maximum canvas size. The maximum canvas size is in device pixels.
#if PLATFORM(IOS_FAMILY)
return 4096 * 4096;
#else
return 16384 * 16384;
#endif
}
Created attachment 447408 [details]
Patch
Comment on attachment 447408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447408&action=review > Source/WebCore/ChangeLog:9 > + We already have a policy about how big canvases can be. Simply export tat policy “tat” Looks like window.internals.setMaxCanvasPixelMemory() doesn’t make it to the GPU Process 🤔 Created attachment 448651 [details]
Patch for committing
Created attachment 448652 [details]
Patch for committing
Committed r287805 (245857@trunk): <https://commits.webkit.org/245857@trunk> |