mgraphics what is it?

Ted Wiggin's icon

Hi all
I'm trying to flesh out my understanding of mgraphics, a few questions --

Is it an implementation of cairo?
I get that it runs on the cpu, but how? Why is it faster than drawing in LCD?

Why is it so commonly controlled by javascript? Are there things that it can do with javascript that it can't do using normal max messages?