diff options
author | Mike Klein <mtklein@google.com> | 2017-09-18 19:29:24 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-18 19:29:33 +0000 |
commit | ad04a4b08e82558d3fca62611028677770a47f10 (patch) | |
tree | ec2fb3fc4a6091c6c5e06c57bbd73f4c0a6d6eba /src/core/SkBlitter.cpp | |
parent | 1b20d7e16bdc087d8e7df534c0782fbfbb91efa4 (diff) |
Revert "Call blitFatAntiRect to avoid overhead in MaskAdditiveBlitter"
This reverts commit 6d1aaca8276ff4ae2e10870f7e2c3222907cc4aa.
Reason for revert: speculative revert for Google3 diff.
Original change's description:
> Call blitFatAntiRect to avoid overhead in MaskAdditiveBlitter
>
> This results in 25% (720ns vs 560ns) speedup for
> path_fill_small_rect bench in 8888 config. Some skps have a lot of stroked
> horizontal/vertical lines (e.g., bar charts) so this improvement could
> have a great impact there. For example, cereal converts Microsoft word docx
> to PNGs on server and the sample docx has a big bar chart. That inspired
> this improvement.
>
> Bug: skia:
> Change-Id: Icf96c966edf87427b3d1f53da09a49930eda2ac1
> Reviewed-on: https://skia-review.googlesource.com/46584
> Commit-Queue: Yuqian Li <liyuqian@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,herb@google.com,liyuqian@google.com,reed@google.com
Change-Id: Ia30df0be874749c5f8ee0138f3d7d961d5bc3fcf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/48220
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/core/SkBlitter.cpp')
-rw-r--r-- | src/core/SkBlitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index 8059f6ed57..5eb5dd80d0 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -45,8 +45,9 @@ inline static SkAlpha ScalarToAlpha(SkScalar a) { return (SkAlpha)(a * 255); } -void SkBlitter::blitFatAntiRect(const SkRect& rect, const SkIRect& bounds) { - SkASSERT(rect.roundOut() == bounds && bounds.width() >= 3 && bounds.height() >= 3); +void SkBlitter::blitFatAntiRect(const SkRect& rect) { + SkIRect bounds = rect.roundOut(); + SkASSERT(bounds.width() >= 3 && bounds.height() >= 3); int runSize = bounds.width() + 1; // +1 so we can set runs[bounds.width()] = 0 void* storage = this->allocBlitMemory(runSize * (sizeof(int16_t) + sizeof(SkAlpha))); |