diff options
author | Florin Malita <fmalita@chromium.org> | 2017-07-12 13:31:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-12 20:36:45 +0000 |
commit | 5769dd2c9ad9443b8cf2d62748d5747e547c7ad5 (patch) | |
tree | 912ab12f89b385392d5db0da9700e40968fa69f7 /src/core/SkBlitter.cpp | |
parent | d4b2c537d058ad4cb890ba116d00aa86c3416c08 (diff) |
Add some raster pipeline perspective asserts
I meant to add these when removing the guard, but since we landed without
a guard, might as well do it now.
A couple of things exposed by these asserts:
1) we need to also catch perspective in local matrices
2) we need to disallow burst mode with perspective
Also tweak the predicate to hasPerspective() instead of explicit mask
check.
Change-Id: I099e5125fca52dccffca77c60fc800bbdf539b53
Reviewed-on: https://skia-review.googlesource.com/22483
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/core/SkBlitter.cpp')
-rw-r--r-- | src/core/SkBlitter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index 24414f3184..c79795b5fe 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -792,10 +792,6 @@ bool SkBlitter::UseRasterPipelineBlitter(const SkPixmap& device, const SkPaint& if (device.colorSpace()) { return true; } - // ... unless the shader is raster pipeline-only. - if (paint.getShader() && as_SB(paint.getShader())->isRasterPipelineOnly()) { - return true; - } if (paint.getColorFilter()) { return true; } @@ -804,13 +800,18 @@ bool SkBlitter::UseRasterPipelineBlitter(const SkPixmap& device, const SkPaint& return true; } #endif - // ... or unless the blend mode is complicated enough. + // ... unless the blend mode is complicated enough. if (paint.getBlendMode() > SkBlendMode::kLastSeparableMode) { return true; } // ... or unless we have to deal with perspective. - if (matrix.getType() & SkMatrix::kPerspective_Mask) { + if (matrix.hasPerspective()) { + return true; + } + + // ... or unless the shader is raster pipeline-only. + if (paint.getShader() && as_SB(paint.getShader())->isRasterPipelineOnly()) { return true; } |