diff options
author | 2018-04-16 14:23:00 -0600 | |
---|---|---|
committer | 2018-04-16 22:50:45 +0000 | |
commit | 1d4af54a7b61badf2a7e6c3730b2ef01b9cd1fa2 (patch) | |
tree | 9892e21b7451034bfde1126013e8c497cc202418 /src/gpu/effects | |
parent | 37c5403890000289d7db9fd1d90cf96c2ee12bf3 (diff) |
Don't support GrCubicEffect if float != fp32
Otherwise the cubic math is too unstable.
Bug: skia:
Change-Id: I2c8d8d9abcae517d42dd3eddb5bf455c7c7487dd
Reviewed-on: https://skia-review.googlesource.com/121709
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrBezierEffect.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h index 267259e634..174470410c 100644 --- a/src/gpu/effects/GrBezierEffect.h +++ b/src/gpu/effects/GrBezierEffect.h @@ -229,6 +229,11 @@ public: bool flipKL, const GrClipEdgeType edgeType, const GrCaps& caps) { + if (!caps.shaderCaps()->floatIs32Bits()) { + // Cubic math will be too unstable if the hardware doesn't support full fp32. + return nullptr; + } + // Map KLM to something that operates in device space. SkMatrix devKLM; if (!viewMatrix.invert(&devKLM)) { |