3 ms·
I am by no means an expert in graphics architectures so I'm sure someone will be able to explain this better and more correctly than I can. But as I understand
by fauigerzigerk 6y ago
I am by no means an expert in graphics architectures so I'm sure someone will be able to explain this better and more correctly than I can. But as I understand it, "native" is itself a layered stack of APIs as you can see in this diagram:
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html https://developer.apple.com/library/archive/documentation/Co...
UIKit/AppKit is layered on top of Core Animation which is layered on top of Metal. Skia, the 2D graphics library that Chrome's rendering engine uses, is built on top of Metal (or at least transitioning to Metal from OpenGL on macOS).
So browsers have the same flexibility in principle as native UI toolkits and they are just as close to the metal. There is no inherent disadvantage. But flexibility is a double edged sword. It includes the ability to diverge from the platform look & feel. So that's where the debate has been raging on for decades.
In terms of performance I think any debate about optimisation of UI stacks pales in comparison to the question of where the data lives, who generates it, and how it gets to the CPU/GPU for processing and display.
- saagarjha 6y agoSaying that "both use Metal and have layers in between therefore they are largely at the same place" doesn't really work, because the abstraction layer that they expose is at a vastly different place and the internal pipeline for both is also very different.