Update GrPaint APIs to reflect lack of multiple color processors.
Change-Id: Ic7799b3c5f4294cba9ff72f8c11a2ad285ab189f
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304738
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
index d20a1d3..747be19 100644
--- a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
@@ -60,11 +60,9 @@
// The lack of vertex shaders means we can't move transform matrices into the vertex shader. We
// could do the transform in the fragment processor, but that would be very slow, so instead we
// just avoid using this path renderer in the face of transformed FPs.
- if (args.fPaint) {
- for (int i = args.fPaint->numColorFragmentProcessors() - 1; i >= 0; --i) {
- if (has_matrix(*args.fPaint->getColorFragmentProcessor(i))) {
- return CanDrawPath::kNo;
- }
+ if (args.fPaint && args.fPaint->hasColorFragmentProcessor()) {
+ if (has_matrix(*args.fPaint->getColorFragmentProcessor())) {
+ return CanDrawPath::kNo;
}
}
return CanDrawPath::kYes;