Commit Graph

2 Commits

Author SHA1 Message Date
msarett
febb224699 Reduce CPU overhead on drawRegion()
Only batch when the view matrices are the same.

This allows us to skip applying the matrix and uploading
local coords.

drawregion Bench on Nexus 6P:
Before 4.69ms
After  2.83ms

This puts SkiaGL nearly on par with OpenGL.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2282983003

Review-Url: https://codereview.chromium.org/2282983003
2016-08-26 12:49:27 -07:00
msarett
44df651ebe Add drawRegion() API to SkCanvas
This will allow us to optimize for the RectGrid macrobench.
Currently, SkiaGL is much slower than OpenGL.
SkiaGL  12 items/s
OpenGL 160 items/s

This contains everything except for the fast implementation on GPU.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277053002

Review-Url: https://codereview.chromium.org/2277053002
2016-08-25 13:54:30 -07:00