[graphite] Correct sort order when using analytic and shader clips.
Without this correction, non-AA fill draws involving analytic or
shader clips can be pushed too early in CompressedPaintersOrder.
This can lead to us drawing with the wrong dst color and/or writing
depth and blocking draws that should have been rendered.
Change-Id: I75aecf5ef2a7e58277720b2d2b71d21c41a9adce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/906992
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/graphite/Device.cpp b/src/gpu/graphite/Device.cpp
index 3e8b74b..b9f07a2 100644
--- a/src/gpu/graphite/Device.cpp
+++ b/src/gpu/graphite/Device.cpp
@@ -1290,7 +1290,8 @@
sk_ref_sp(clip.shader()),
dstReadReq,
skipColorXform};
- const bool dependsOnDst = paint_depends_on_dst(shading);
+ const bool dependsOnDst = paint_depends_on_dst(shading) ||
+ clip.shader() || !clip.analyticClip().isEmpty();
// Some shapes and styles combine multiple draws so the total render step count is split between
// the main renderer and possibly a secondaryRenderer.