| Summary: | IOSurface size limit in the web content process is too small, only 1024x1024 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, bfulgham, pvollan, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
What is the correct behavior here, is 1024x1024 bad? 1024x1024 is much too small, causing fallback to software buffers. We need to just share the iOS code. Pull request: https://github.com/WebKit/WebKit/pull/6062 Committed 256359@main (2bce581d4f10): <https://commits.webkit.org/256359@main> Reviewed commits have been landed. Closing PR #6062 and removing active labels. |
Sandboxing causes `IOSurfaceGetPropertyMaximum(kIOSurfaceWidth)` to fail, so we fall back to a maximum IOSurface size of 1024x1024 here: static IntSize computeMaximumSurfaceSize() { #if PLATFORM(IOS) return maxSurfaceDimensionCA(); #else IntSize maxSize(clampToInteger(IOSurfaceGetPropertyMaximum(kIOSurfaceWidth)), clampToInteger(IOSurfaceGetPropertyMaximum(kIOSurfaceHeight))); // Protect against maxSize being { 0, 0 }. constexpr int maxSurfaceDimensionLowerBound = 1024; return maxSize.constrainedBetween({ maxSurfaceDimensionLowerBound, maxSurfaceDimensionLowerBound }, maxSurfaceDimensionCA() ); #endif } Not sure why the iOS code is different.