diff options
author | Jim Van Verth <jvanverth@google.com> | 2017-01-12 10:00:16 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-12 16:10:49 +0000 |
commit | 062990bc7a8a667d6282ff73188589e57c7607ed (patch) | |
tree | 1ea8356641357b78f4e9021feea5e5e8137ebdde /src/gpu/ops/GrAADistanceFieldPathRenderer.cpp | |
parent | d32303e7276b8a824a4d95e4b1676f9eb201ed5e (diff) |
Fix perf regression with SDF paths
BUG=skia:6113,chromium:677889
Change-Id: I13d012a92e4d0371138f5ed4b92c7850f9b773a5
Reviewed-on: https://skia-review.googlesource.com/6945
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/ops/GrAADistanceFieldPathRenderer.cpp')
-rw-r--r-- | src/gpu/ops/GrAADistanceFieldPathRenderer.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp index d025c94047..891eab3e00 100644 --- a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp @@ -39,7 +39,6 @@ static int g_NumFreedShapes = 0; #endif // mip levels -static const int kMinSize = 16; static const int kSmallMIP = 32; static const int kMediumMIP = 73; static const int kLargeMIP = 162; @@ -110,15 +109,12 @@ bool GrAADistanceFieldPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c // Only support paths with bounds within kMediumMIP by kMediumMIP, // scaled to have bounds within 2.0f*kLargeMIP by 2.0f*kLargeMIP. - // For clarity, the original or scaled path should be at least kMinSize by kMinSize. - // TODO: revisit this last criteria with Joel's patch. // The goal is to accelerate rendering of lots of small paths that may be scaling. SkScalar maxScale = args.fViewMatrix->getMaxScale(); SkRect bounds = args.fShape->styledBounds(); SkScalar maxDim = SkMaxScalar(bounds.width(), bounds.height()); - return maxDim <= kMediumMIP && - maxDim * maxScale >= kMinSize && maxDim * maxScale <= 2.0f*kLargeMIP; + return maxDim <= kMediumMIP && maxDim * maxScale <= 2.0f*kLargeMIP; } //////////////////////////////////////////////////////////////////////////////// |