Reland "Reland "Enable the atlas path renderer for GrAAType::kCoverage""
This is a reland of 03b7935068b4a634f09c641562eac6ddf3768d61
Original change's description:
> Reland "Enable the atlas path renderer for GrAAType::kCoverage"
>
> This is a reland of 8cd8e27c2ceb886ec7fb1e91afcd641cf7e7d175
>
> Original change's description:
> > Enable the atlas path renderer for GrAAType::kCoverage
> >
> > This will definitely cause regressions on a whole slew of benchmarks
> > that were carelessly regurgitating cached bitmaps until the system
> > memory was blown. But the well defined memory limits of the atlas and
> > resilience to animation are worth it. If a client still wants this
> > type of caching they can always render their own bitmaps using Skia
> > and cache them.
> >
> > Bug: chromium:928984
> > Bug: skia:12258
> > Change-Id: I277f50cb9192f1cf5fe8d4b7f629abe72432150a
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433917
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:928984
> Bug: skia:12258
> Change-Id: I59d7b0684b7569d62939b6a8035fa6e92f4c02f3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436356
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: chromium:928984
Bug: skia:12258
Change-Id: I5259e86692e66f52795dde0da1a84c062c223b96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436860
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ops/GrAtlasPathRenderer.cpp b/src/gpu/ops/GrAtlasPathRenderer.cpp
index b9ac4a6..0d5cf0b 100644
--- a/src/gpu/ops/GrAtlasPathRenderer.cpp
+++ b/src/gpu/ops/GrAtlasPathRenderer.cpp
@@ -44,6 +44,13 @@
constexpr static int kAtlasMaxPathWidth = 1024;
bool GrAtlasPathRenderer::IsSupported(GrRecordingContext* rContext) {
+#ifdef SK_BUILD_FOR_IOS
+ // b/195095846: There is a bug with the atlas path renderer on OpenGL iOS. Disable until we can
+ // investigate.
+ if (rContext->backend() == GrBackendApi::kOpenGL) {
+ return false;
+ }
+#endif
const GrCaps& caps = *rContext->priv().caps();
auto atlasFormat = caps.getDefaultBackendFormat(kAtlasAlpha8Type, GrRenderable::kYes);
return rContext->asDirectContext() && // The atlas doesn't support DDL yet.
@@ -220,9 +227,13 @@
SkASSERT(!args.fHasUserStencilSettings); // See onGetStencilSupport().
#endif
bool canDrawPath = args.fShape->style().isSimpleFill() &&
+#ifdef SK_DISABLE_ATLAS_PATH_RENDERER_WITH_COVERAGE_AA
// The MSAA requirement is a temporary limitation in order to preserve
// functionality for refactoring. TODO: Allow kCoverage AA types.
args.fAAType == GrAAType::kMSAA &&
+#else
+ args.fAAType != GrAAType::kNone &&
+#endif
!args.fShape->style().hasPathEffect() &&
!args.fViewMatrix->hasPerspective() &&
this->pathFitsInAtlas(args.fViewMatrix->mapRect(args.fShape->bounds()),