From 46d0c04b3d235a354156f2e829c37cc59a011ba4 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Tue, 4 May 2021 20:43:12 +0000 Subject: [PATCH] Revert "Re-enable tessellation for cacheable paths" This reverts commit dbed5775017a6ef6f988ea8dd2bf90c833e14ae4. Reason for revert: Indirect draw regression for filled paths on Adreno Original change's description: > Re-enable tessellation for cacheable paths > > Now that the fixed count stroke tessellator has landed, these should > hopefully not regress performance. > > Bug: skia:11138 > Bug: skia:11139 > Change-Id: Ifdcd817705d394ea6d0f932711ed725a66a7fc91 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403956 > Reviewed-by: Greg Daniel > Commit-Queue: Chris Dalton TBR=egdaniel@google.com,csmartdalton@google.com Change-Id: I2c9b76636ef4532eadb56f00663750ce40d55c41 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:11138 Bug: skia:11139 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404397 Reviewed-by: Chris Dalton Commit-Queue: Chris Dalton --- src/gpu/tessellate/GrTessellationPathRenderer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gpu/tessellate/GrTessellationPathRenderer.cpp b/src/gpu/tessellate/GrTessellationPathRenderer.cpp index 27f4ed5810..8804a4aea2 100644 --- a/src/gpu/tessellate/GrTessellationPathRenderer.cpp +++ b/src/gpu/tessellate/GrTessellationPathRenderer.cpp @@ -137,6 +137,15 @@ GrPathRenderer::CanDrawPath GrTessellationPathRenderer::onCanDrawPath( !args.fProxy->canUseStencil(*args.fCaps)) { return CanDrawPath::kNo; } + // On platforms that don't have native support for indirect draws and/or hardware tessellation, + // we find that cached triangulations of strokes can render slightly faster. Let cacheable paths + // go to the triangulator on these platforms for now. + // (crbug.com/1163441, skbug.com/11138, skbug.com/11139) + if (!args.fCaps->nativeDrawIndirectSupport() && + !args.fCaps->shaderCaps()->tessellationSupport() && + shape.hasUnstyledKey()) { // Is the path cacheable? + return CanDrawPath::kNo; + } return CanDrawPath::kYes; }