Post

Replies

Boosts

Views

Activity

Reply to iOS 15 Experimental WebKit Features: GPU Process: Canvas Rendering
After more testing we've found temporary work arounds by reducing the quality and choosing static textures in place of animated ones on iOS until we find something that works better. For us these issues seems to be related to larger video textures 1024x1024 and createPattern being repeatedly updated. We manage dirty states for all of this and slow time down when we detect slow rendering update rates and never try updates faster than 30fps. So these calls were only happening when needed and only as fast as requestQuestAnimation frame said it was ready or slower. By lowering our texture sizes to 512x512 and only calling createPattern once (taking out animations) these changes enable our site to not crash tabs but it has lowered the quality of what we can show to users on iOS and are still going to keep looking deeper into other fixes. We would love suggestions if you have any.
Sep ’21
Reply to iOS 15 Experimental WebKit Features: GPU Process: Canvas Rendering
Hi, I work with pmeskers. We are a little unclear about "will remain that way until the final releases ship" Does this mean that when it ships this setting will change or that the setting that is active in the beta usually ships to everyone. I'm not holding you to anything but our app is crashing browser tabs because of this features just trying to establish if we should work on this which likely involves some pretty deep rewrites. Our app is decoding video (mp4) and GIFs in WebAssembly and converting them into JPEGs and PNGs (on the CPU) in workers and then rendering to canvas elements. From my understanding the GPU is taking over when we are drawing these images into the canvas with drawImage. New GPU textures will be created on every drawImage call for every layer on every frame. Videos and GIFs with more frames cause more memory pressure and at some point something is tripping because we are consuming too many resources. From my understanding, with current canvas rendering this isn't an issue because the GPU textures are not being made, the frame images are stored and passed through every frame without the extra step. But maybe I'm totally off about what the difference is here and how this is working? If you are at some point in the future shipping this feature without patches that prevent the issues above is there anything that we can do to optimize our approach? For instance I see that ImageBitmap is now supported in Safari, would this be a solution rather than saving JPEG and PNG image caches or would this internally work the same as our current approach? Is there something else we can do to protect our browser tabs from crashing or any specific ways that we can debug exactly why these crashes that are happening when this flag is turned on?
Aug ’21