aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLinearBitmapPipeline_tile.h
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-05-03 08:11:52 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-03 08:11:52 -0700
commit871a0484305e9c051e2d78b62e1f2a5fa4bdb3a4 (patch)
treeddbe794aff351f574aa702de7809238f7a704a63 /src/core/SkLinearBitmapPipeline_tile.h
parentbdf8811b3126ab08ccff08b5e647b80cae5bd087 (diff)
Add 8888 fast SrcOver mode.
The SkLinearBitmapPipeline_tile change is an edge case fix. This will not function until gDefaultProfileSRGB in SkImageInfo is set to true. The srcover implementation is not the fastest, and I'm working on a better version. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1886233006 Review-Url: https://codereview.chromium.org/1886233006
Diffstat (limited to 'src/core/SkLinearBitmapPipeline_tile.h')
-rw-r--r--src/core/SkLinearBitmapPipeline_tile.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkLinearBitmapPipeline_tile.h b/src/core/SkLinearBitmapPipeline_tile.h
index 997ab65c47..6fe64f1bce 100644
--- a/src/core/SkLinearBitmapPipeline_tile.h
+++ b/src/core/SkLinearBitmapPipeline_tile.h
@@ -298,7 +298,9 @@ public:
// Repeat the center section.
SkASSERT(0.0f <= repeatableSpan.startX() && repeatableSpan.endX() < fXMax);
- next->repeatSpan(repeatableSpan, repeatCount);
+ if (repeatCount > 0) {
+ next->repeatSpan(repeatableSpan, repeatCount);
+ }
// Calculate the advance past the center portion.
SkScalar advance = SkScalar(repeatCount) * fXMax;