diff options
author | msarett <msarett@google.com> | 2016-08-26 12:49:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-26 12:49:27 -0700 |
commit | febb22469999b928850182ebc57bfd6fbd7402d6 (patch) | |
tree | 40d0bfbf1781f2afb41bf3a0c46b22db94ea8b5f /gm | |
parent | a3f9d59a1731c88fb64c03cda87a04c44b72c889 (diff) |
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
Diffstat (limited to 'gm')
-rw-r--r-- | gm/drawregion.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gm/drawregion.cpp b/gm/drawregion.cpp index 1e9d6c55e2..a2633f9d9f 100644 --- a/gm/drawregion.cpp +++ b/gm/drawregion.cpp @@ -37,6 +37,8 @@ protected: } void onDraw(SkCanvas* canvas) override { + canvas->translate(10, 10); + SkPaint paint; paint.setStyle(SkPaint::kFill_Style); paint.setColor(0xFFFF00FF); |