Paint is an argument on most methods of Canvas, and in many uses the Paint
contains only a color. In this case, return the Paint's value to native code
as an int instead of constructing a list of attributes.
This improved run time on a drawRect benchmark by 35%.
I left this code along in my uber patch to remove the DOM and CSS, but it's
just as dead. Also, move lone files out of dead directories into more sensible
places.
This patch converts sky.Paint to be a pure Dart object, which means we don't
need to open a weak handle to sky.Paint. Avoiding the weak handle reduces the
amount of weak handle callbacks we need to process at the end of GC and
therefore reduces jank.
This is supposed to make Viktor's game faster, but it's not clear
to me that it actually does. I've left the code
using the dart version of drawAtlas for now until Viktor can
verify that it looks correct.
I also added a wrapper for SkFilterQuality in the process of
debugging SkCanvas.drawAtlas since all drawAtlas examples
in Skia use FilterQuality.low. The bug which blocked me for
so long turned out to be that SkCanvas.drawAtlas doesn't
draw anything if antialiasing is turned on.
Issue #138.
R=abarth@google.com