Reduce CPU overhead on drawRegion()
authormsarett <msarett@google.com>
Fri, 26 Aug 2016 19:49:27 +0000 (12:49 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Aug 2016 19:49:27 +0000 (12:49 -0700)
commitfebb22469999b928850182ebc57bfd6fbd7402d6
tree40d0bfbf1781f2afb41bf3a0c46b22db94ea8b5f
parenta3f9d59a1731c88fb64c03cda87a04c44b72c889
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
gm/drawregion.cpp
src/gpu/batches/GrRegionBatch.cpp