Handle non-finite quads in attemptQuadOptimization

Bug: chromium:977315
Change-Id: Ia5b734f5c0f0806af0f096de5add880a777c5c25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222793
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/geometry/GrQuadUtils.h b/src/gpu/geometry/GrQuadUtils.h
index 5f6d283..53b53d2 100644
--- a/src/gpu/geometry/GrQuadUtils.h
+++ b/src/gpu/geometry/GrQuadUtils.h
@@ -25,7 +25,7 @@
      * Crops quad to the provided device-space axis-aligned rectangle. If the intersection of this
      * quad (projected) and cropRect results in a quadrilateral, this returns true. If not, this
      * quad may be updated to be a smaller quad of the same type such that its intersection with
-     * cropRect is visually the same.
+     * cropRect is visually the same. This function assumes that the 'quad' coordinates are finite.
      *
      * The provided edge flags are updated to reflect edges clipped by cropRect (toggling on or off
      * based on cropAA policy). If provided, the local coordinates will be updated to reflect the