NSOpenGLView uses the raw WindowServer “surface” API, which is really efficient, but Apple doesn’t seem to maintain it much…
-
-
e.g. the private CGS Region API isn’t HiDPI aware, which is why window corners turn chunky if overlapped by non layer backed NSOpenGLView.
1 reply 0 retweets 0 likes -
At this point in WebRender we’re pretty much ready to just give up and use Core Animation, which is what Apple officially supports.
1 reply 0 retweets 0 likes -
Also delegating scrolling to CA will let us avoid jank caused by missynchronizing mouse events to sync, which is maddening to fix otherwise.
1 reply 0 retweets 0 likes -
I thought Core Animation would be a happier path, but it didn't pan out for the few implementations I tried. Only way to get pixels to CALayers close to fast enough was with IOSurface (which as I understand it, uploads to GPU memory when unlocked).
1 reply 0 retweets 0 likes -
But then it seemed there was a decent amount of overhead repositioning CALayers while scrolling (we have a tile implementation, and were using one CALayer per tile). Overall I was maxing out the CPU at about 55fps on a 2013rMBP, whereas with OpenGL was getting 60fps at 70% util.
1 reply 0 retweets 0 likes -
BTW we’re all talking about using Core Animation as a way of putting OpenGL-rendered content on the screen. In case that isn’t what you’re talking about. Rendering anything other than glyph atlases on the CPU is way too slow, and
@pcwalton is even fixing that.1 reply 0 retweets 0 likes -
In my case, I'm talking about putting rendered pixel buffers on the screen at 60fps, and OpenGL seems the only ticket for that. Core Animation added overhead preventing me from getting to 60fps. Conceptually CALayers improved some things (like cursors), but overall too slow.
2 replies 0 retweets 0 likes -
CPU rendered pixel buffers? Why? And by OpenGL do you mean uploading textures and then putting them on quads, or rendering in OpenGL? I’ve been assuming you’ve been talking about improving text pane rendering in Sublime, but this doesn’t sound like text.
1 reply 0 retweets 0 likes -
Well, more experienced people than I wrote a fully OpenGL-backed text editor and ran into too many issues with drivers, so on version 2 switched to CPU rendering to reduce bugginess. OpenGL is only used on macOS for uploading textures and putting them on quads, when retina.
1 reply 0 retweets 0 likes
I sympathize with driver issues… they hurt us a lot in WebRender :) But it’s still the way I’d go. Seehttps://github.com/servo/webrender/wiki/Driver-issues …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.