WebGL in <iframe> is very slow with Metal backend enabled. - Disabling Metal backend solves the problem. - I've tried limiting resolution to the minimum 160x90, but it does not help. - I've observed massive battery drain, so it is probably not just Safari is throttling the RAF inside iframe.
Thanks for the report. If you have set of .html files for a simple repro, that would be very helpful.
My mistake Kimmo. While preparing the test files for you, I realized that I am using flat variables in the shaders (inside the test iframe). The slowdown has nothing to do with iframes but with https://bugs.webkit.org/show_bug.cgi?id=246335 I apologize for submitting this false report.
Thanks for letting us know. Once bug 251259 ships, many algorithms using flat shading can use provoking vertex extension to select the most performant configuration for particular platform. *** This bug has been marked as a duplicate of bug 246335 ***