diff options
author | Jim Van Verth <jvanverth@google.com> | 2017-03-16 08:45:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-16 13:22:31 +0000 |
commit | 830104632fd79eb5ac5bf8755a1c0271d13acb22 (patch) | |
tree | a8914fd30c729207c42744d871fac1a5f71c2338 | |
parent | 69225d02500c882053864410b1b775197455f2c5 (diff) |
Rename GrAADistanceFieldPathRenderer to GrSmallPathRenderer
Also disables use of small distance fields in Android framework.
Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868
Reviewed-on: https://skia-review.googlesource.com/9731
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
-rw-r--r-- | gn/gpu.gni | 12 | ||||
-rw-r--r-- | include/gpu/GrContextOptions.h | 7 | ||||
-rw-r--r-- | src/gpu/GrDrawOpTest.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrPathRendererChain.cpp | 6 | ||||
-rw-r--r-- | src/gpu/GrRenderTargetContext.h | 2 | ||||
-rw-r--r-- | src/gpu/ops/GrSmallPathRenderer.cpp (renamed from src/gpu/ops/GrAADistanceFieldPathRenderer.cpp) | 61 | ||||
-rw-r--r-- | src/gpu/ops/GrSmallPathRenderer.h (renamed from src/gpu/ops/GrAADistanceFieldPathRenderer.h) | 12 | ||||
-rw-r--r-- | tests/DFPathRendererTest.cpp | 8 | ||||
-rw-r--r-- | tools/flags/SkCommonFlagsPathRenderer.h | 6 | ||||
-rw-r--r-- | tools/viewer/Viewer.cpp | 6 |
10 files changed, 61 insertions, 63 deletions
diff --git a/gn/gpu.gni b/gn/gpu.gni index 6dc08a4b11..aa10fe4a83 100644 --- a/gn/gpu.gni +++ b/gn/gpu.gni @@ -225,18 +225,16 @@ skia_gpu_sources = [ "$_src/gpu/GrYUVProvider.h", # Ops - "$_src/gpu/ops/GrAAHairLinePathRenderer.cpp", - "$_src/gpu/ops/GrAAHairLinePathRenderer.h", - "$_src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp", - "$_src/gpu/ops/GrAALinearizingConvexPathRenderer.h", "$_src/gpu/ops/GrAAConvexTessellator.cpp", "$_src/gpu/ops/GrAAConvexTessellator.h", - "$_src/gpu/ops/GrAADistanceFieldPathRenderer.cpp", - "$_src/gpu/ops/GrAADistanceFieldPathRenderer.h", "$_src/gpu/ops/GrAAConvexPathRenderer.cpp", "$_src/gpu/ops/GrAAConvexPathRenderer.h", "$_src/gpu/ops/GrAAFillRectOp.cpp", "$_src/gpu/ops/GrAAFillRectOp.h", + "$_src/gpu/ops/GrAAHairLinePathRenderer.cpp", + "$_src/gpu/ops/GrAAHairLinePathRenderer.h", + "$_src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp", + "$_src/gpu/ops/GrAALinearizingConvexPathRenderer.h", "$_src/gpu/ops/GrAAStrokeRectOp.cpp", "$_src/gpu/ops/GrAAStrokeRectOp.h", "$_src/gpu/ops/GrAnalyticRectOp.cpp", @@ -284,6 +282,8 @@ skia_gpu_sources = [ "$_src/gpu/ops/GrSemaphoreOp.h", "$_src/gpu/ops/GrShadowRRectOp.cpp", "$_src/gpu/ops/GrShadowRRectOp.h", + "$_src/gpu/ops/GrSmallPathRenderer.cpp", + "$_src/gpu/ops/GrSmallPathRenderer.h", "$_src/gpu/ops/GrStencilAndCoverPathRenderer.cpp", "$_src/gpu/ops/GrStencilAndCoverPathRenderer.h", "$_src/gpu/ops/GrStencilPathOp.h", diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index 4c922f3d2f..8b61c9c1bc 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -94,11 +94,14 @@ struct GrContextOptions { kAAHairline = 1 << 3, kAAConvex = 1 << 4, kAALinearizing = 1 << 5, - kDistanceField = 1 << 6, + kSmall = 1 << 6, kTessellating = 1 << 7, kDefault = 1 << 8, - kAll = kDefault | (kDefault - 1) + kAll = kDefault | (kDefault - 1), + + // For legacy. To be removed when updated in Android. + kDistanceField = kSmall }; GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kAll; diff --git a/src/gpu/GrDrawOpTest.cpp b/src/gpu/GrDrawOpTest.cpp index c2bf2c6c0e..6e63f5d0e1 100644 --- a/src/gpu/GrDrawOpTest.cpp +++ b/src/gpu/GrDrawOpTest.cpp @@ -18,7 +18,6 @@ #define DRAW_OP_TEST_ENTRY(Op) Op##__Test DRAW_OP_TEST_EXTERN(AAConvexPathOp); -DRAW_OP_TEST_EXTERN(AADistanceFieldPathOp); DRAW_OP_TEST_EXTERN(AAFillRectOp); DRAW_OP_TEST_EXTERN(AAFillRectOpLocalMatrix); DRAW_OP_TEST_EXTERN(AAFlatteningConvexPathOp) @@ -33,6 +32,7 @@ DRAW_OP_TEST_EXTERN(EllipseOp); DRAW_OP_TEST_EXTERN(GrDrawAtlasOp); DRAW_OP_TEST_EXTERN(NonAAStrokeRectOp); DRAW_OP_TEST_EXTERN(RRectOp); +DRAW_OP_TEST_EXTERN(SmallPathOp); DRAW_OP_TEST_EXTERN(TesselatingPathOp); DRAW_OP_TEST_EXTERN(TextBlobOp); DRAW_OP_TEST_EXTERN(VerticesOp); @@ -41,7 +41,6 @@ std::unique_ptr<GrMeshDrawOp> GrRandomDrawOp(SkRandom* random, GrContext* contex using MakeTestDrawOpFn = std::unique_ptr<GrMeshDrawOp>(SkRandom* random, GrContext* context); static constexpr MakeTestDrawOpFn* gFactories[] = { DRAW_OP_TEST_ENTRY(AAConvexPathOp), - DRAW_OP_TEST_ENTRY(AADistanceFieldPathOp), DRAW_OP_TEST_ENTRY(AAFillRectOp), DRAW_OP_TEST_ENTRY(AAFillRectOpLocalMatrix), DRAW_OP_TEST_ENTRY(AAFlatteningConvexPathOp), @@ -56,6 +55,7 @@ std::unique_ptr<GrMeshDrawOp> GrRandomDrawOp(SkRandom* random, GrContext* contex DRAW_OP_TEST_ENTRY(GrDrawAtlasOp), DRAW_OP_TEST_ENTRY(NonAAStrokeRectOp), DRAW_OP_TEST_ENTRY(RRectOp), + DRAW_OP_TEST_ENTRY(SmallPathOp), DRAW_OP_TEST_ENTRY(TesselatingPathOp), DRAW_OP_TEST_ENTRY(TextBlobOp), DRAW_OP_TEST_ENTRY(VerticesOp) diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp index 6c8177f8e0..55c4a305dc 100644 --- a/src/gpu/GrPathRendererChain.cpp +++ b/src/gpu/GrPathRendererChain.cpp @@ -15,9 +15,9 @@ #include "GrGpu.h" #include "ops/GrAAConvexPathRenderer.h" -#include "ops/GrAADistanceFieldPathRenderer.h" #include "ops/GrAAHairLinePathRenderer.h" #include "ops/GrAALinearizingConvexPathRenderer.h" +#include "ops/GrSmallPathRenderer.h" #include "ops/GrDashLinePathRenderer.h" #include "ops/GrDefaultPathRenderer.h" #include "ops/GrMSAAPathRenderer.h" @@ -53,8 +53,8 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti if (options.fGpuPathRenderers & GpuPathRenderers::kAALinearizing) { fChain.push_back(sk_make_sp<GrAALinearizingConvexPathRenderer>()); } - if (options.fGpuPathRenderers & GpuPathRenderers::kDistanceField) { - fChain.push_back(sk_make_sp<GrAADistanceFieldPathRenderer>()); + if (options.fGpuPathRenderers & GpuPathRenderers::kSmall) { + fChain.push_back(sk_make_sp<GrSmallPathRenderer>()); } if (options.fGpuPathRenderers & GpuPathRenderers::kTessellating) { fChain.push_back(sk_make_sp<GrTessellatingPathRenderer>()); diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h index 81684bd412..c6793d3a82 100644 --- a/src/gpu/GrRenderTargetContext.h +++ b/src/gpu/GrRenderTargetContext.h @@ -430,7 +430,7 @@ private: friend class GrDashLinePathRenderer; // for access to add[Mesh]DrawOp friend class GrAAHairLinePathRenderer; // for access to add[Mesh]DrawOp friend class GrAALinearizingConvexPathRenderer; // for access to add[Mesh]DrawOp - friend class GrAADistanceFieldPathRenderer; // for access to add[Mesh]DrawOp + friend class GrSmallPathRenderer; // for access to add[Mesh]DrawOp friend class GrDefaultPathRenderer; // for access to add[Mesh]DrawOp friend class GrMSAAPathRenderer; // for access to add[Mesh]DrawOp friend class GrStencilAndCoverPathRenderer; // for access to add[Mesh]DrawOp diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp index 0d151df29d..94364a643b 100644 --- a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/ops/GrSmallPathRenderer.cpp @@ -6,7 +6,7 @@ * found in the LICENSE file. */ -#include "GrAADistanceFieldPathRenderer.h" +#include "GrSmallPathRenderer.h" #include "GrBuffer.h" #include "GrContext.h" @@ -49,8 +49,8 @@ static const SkScalar kMinSize = SK_ScalarHalf; static const SkScalar kMaxSize = 2*kMaxMIP; // Callback to clear out internal path cache when eviction occurs -void GrAADistanceFieldPathRenderer::HandleEviction(GrDrawOpAtlas::AtlasID id, void* pr) { - GrAADistanceFieldPathRenderer* dfpr = (GrAADistanceFieldPathRenderer*)pr; +void GrSmallPathRenderer::HandleEviction(GrDrawOpAtlas::AtlasID id, void* pr) { + GrSmallPathRenderer* dfpr = (GrSmallPathRenderer*)pr; // remove any paths that use this plot ShapeDataList::Iter iter; iter.init(dfpr->fShapeList, ShapeDataList::Iter::kHead_IterStart); @@ -69,9 +69,9 @@ void GrAADistanceFieldPathRenderer::HandleEviction(GrDrawOpAtlas::AtlasID id, vo } //////////////////////////////////////////////////////////////////////////////// -GrAADistanceFieldPathRenderer::GrAADistanceFieldPathRenderer() : fAtlas(nullptr) {} +GrSmallPathRenderer::GrSmallPathRenderer() : fAtlas(nullptr) {} -GrAADistanceFieldPathRenderer::~GrAADistanceFieldPathRenderer() { +GrSmallPathRenderer::~GrSmallPathRenderer() { ShapeDataList::Iter iter; iter.init(fShapeList, ShapeDataList::Iter::kHead_IterStart); ShapeData* shapeData; @@ -86,7 +86,7 @@ GrAADistanceFieldPathRenderer::~GrAADistanceFieldPathRenderer() { } //////////////////////////////////////////////////////////////////////////////// -bool GrAADistanceFieldPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { +bool GrSmallPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { if (!args.fShaderCaps->shaderDerivativeSupport()) { return false; } @@ -133,23 +133,23 @@ bool GrAADistanceFieldPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c // padding around path bounds to allow for antialiased pixels static const SkScalar kAntiAliasPad = 1.0f; -class AADistanceFieldPathOp final : public GrMeshDrawOp { +class SmallPathOp final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID - using ShapeData = GrAADistanceFieldPathRenderer::ShapeData; + using ShapeData = GrSmallPathRenderer::ShapeData; using ShapeCache = SkTDynamicHash<ShapeData, ShapeData::Key>; - using ShapeDataList = GrAADistanceFieldPathRenderer::ShapeDataList; + using ShapeDataList = GrSmallPathRenderer::ShapeDataList; static std::unique_ptr<GrMeshDrawOp> Make(GrColor color, const GrShape& shape, const SkMatrix& viewMatrix, GrDrawOpAtlas* atlas, ShapeCache* shapeCache, ShapeDataList* shapeList, bool gammaCorrect) { - return std::unique_ptr<GrMeshDrawOp>(new AADistanceFieldPathOp( - color, shape, viewMatrix, atlas, shapeCache, shapeList, gammaCorrect)); + return std::unique_ptr<GrMeshDrawOp>(new SmallPathOp(color, shape, viewMatrix, atlas, + shapeCache, shapeList, gammaCorrect)); } - const char* name() const override { return "AADistanceFieldPathOp"; } + const char* name() const override { return "SmallPathOp"; } SkString dumpInfo() const override { SkString string; @@ -162,18 +162,18 @@ public: } private: - AADistanceFieldPathOp(GrColor color, const GrShape& shape, const SkMatrix& viewMatrix, - GrDrawOpAtlas* atlas, ShapeCache* shapeCache, ShapeDataList* shapeList, - bool gammaCorrect) + SmallPathOp(GrColor color, const GrShape& shape, const SkMatrix& viewMatrix, + GrDrawOpAtlas* atlas, ShapeCache* shapeCache, ShapeDataList* shapeList, + bool gammaCorrect) : INHERITED(ClassID()) { SkASSERT(shape.hasUnstyledKey()); // Compute bounds this->setTransformedBounds(shape.bounds(), viewMatrix, HasAABloat::kYes, IsZeroArea::kNo); -#ifdef SK_BUILD_FOR_ANDROID +#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) fUsesDistanceField = true; #else - // only use distance fields on desktop to save space in the atlas + // only use distance fields on desktop and Android framework to save space in the atlas fUsesDistanceField = this->bounds().width() > kMaxMIP || this->bounds().height() > kMaxMIP; #endif fViewMatrix = viewMatrix; @@ -696,7 +696,7 @@ private: bool usesDistanceField() const { return fUsesDistanceField; } bool onCombineIfPossible(GrOp* t, const GrCaps& caps) override { - AADistanceFieldPathOp* that = t->cast<AADistanceFieldPathOp>(); + SmallPathOp* that = t->cast<SmallPathOp>(); if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *that->pipeline(), that->bounds(), caps)) { return false; @@ -740,9 +740,9 @@ private: typedef GrMeshDrawOp INHERITED; }; -bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { +bool GrSmallPathRenderer::onDrawPath(const DrawPathArgs& args) { GR_AUDIT_TRAIL_AUTO_FRAME(args.fRenderTargetContext->auditTrail(), - "GrAADistanceFieldPathRenderer::onDrawPath"); + "GrSmallPathRenderer::onDrawPath"); // we've already bailed on inverse filled paths, so this is safe SkASSERT(!args.fShape->isEmpty()); @@ -752,14 +752,14 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { kAlpha_8_GrPixelConfig, ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, NUM_PLOTS_X, NUM_PLOTS_Y, - &GrAADistanceFieldPathRenderer::HandleEviction, + &GrSmallPathRenderer::HandleEviction, (void*)this); if (!fAtlas) { return false; } } - std::unique_ptr<GrMeshDrawOp> op = AADistanceFieldPathOp::Make( + std::unique_ptr<GrMeshDrawOp> op = SmallPathOp::Make( args.fPaint.getColor(), *args.fShape, *args.fViewMatrix, fAtlas.get(), &fShapeCache, &fShapeList, args.fGammaCorrect); GrPipelineBuilder pipelineBuilder(std::move(args.fPaint), args.fAAType); @@ -775,9 +775,9 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { #if GR_TEST_UTILS struct PathTestStruct { - typedef GrAADistanceFieldPathRenderer::ShapeCache ShapeCache; - typedef GrAADistanceFieldPathRenderer::ShapeData ShapeData; - typedef GrAADistanceFieldPathRenderer::ShapeDataList ShapeDataList; + typedef GrSmallPathRenderer::ShapeCache ShapeCache; + typedef GrSmallPathRenderer::ShapeData ShapeData; + typedef GrSmallPathRenderer::ShapeDataList ShapeDataList; PathTestStruct() : fContextID(SK_InvalidGenID), fAtlas(nullptr) {} ~PathTestStruct() { this->reset(); } @@ -816,7 +816,7 @@ struct PathTestStruct { ShapeDataList fShapeList; }; -DRAW_OP_TEST_DEFINE(AADistanceFieldPathOp) { +DRAW_OP_TEST_DEFINE(SmallPathOp) { static PathTestStruct gTestStruct; if (context->uniqueID() != gTestStruct.fContextID) { @@ -836,13 +836,8 @@ DRAW_OP_TEST_DEFINE(AADistanceFieldPathOp) { // This path renderer only allows fill styles. GrShape shape(GrTest::TestPath(random), GrStyle::SimpleFill()); - return AADistanceFieldPathOp::Make(color, - shape, - viewMatrix, - gTestStruct.fAtlas.get(), - &gTestStruct.fShapeCache, - &gTestStruct.fShapeList, - gammaCorrect); + return SmallPathOp::Make(color, shape, viewMatrix, gTestStruct.fAtlas.get(), + &gTestStruct.fShapeCache, &gTestStruct.fShapeList, gammaCorrect); } #endif diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.h b/src/gpu/ops/GrSmallPathRenderer.h index 732888e3ba..ba752d0cff 100644 --- a/src/gpu/ops/GrAADistanceFieldPathRenderer.h +++ b/src/gpu/ops/GrSmallPathRenderer.h @@ -5,8 +5,8 @@ * found in the LICENSE file. */ -#ifndef GrAADistanceFieldPathRenderer_DEFINED -#define GrAADistanceFieldPathRenderer_DEFINED +#ifndef GrSmallPathRenderer_DEFINED +#define GrSmallPathRenderer_DEFINED #include "GrDrawOpAtlas.h" #include "GrPathRenderer.h" @@ -18,10 +18,10 @@ class GrContext; -class GrAADistanceFieldPathRenderer : public GrPathRenderer { +class GrSmallPathRenderer : public GrPathRenderer { public: - GrAADistanceFieldPathRenderer(); - virtual ~GrAADistanceFieldPathRenderer(); + GrSmallPathRenderer(); + virtual ~GrSmallPathRenderer(); private: StencilSupport onGetStencilSupport(const GrShape&) const override { @@ -129,7 +129,7 @@ private: typedef GrPathRenderer INHERITED; - friend class AADistanceFieldPathOp; + friend class SmallPathOp; friend struct PathTestStruct; }; diff --git a/tests/DFPathRendererTest.cpp b/tests/DFPathRendererTest.cpp index 96ccbd7394..653db822f9 100644 --- a/tests/DFPathRendererTest.cpp +++ b/tests/DFPathRendererTest.cpp @@ -11,7 +11,7 @@ #if SK_SUPPORT_GPU #include "GrContext.h" -#include "ops/GrAADistanceFieldPathRenderer.h" +#include "ops/GrSmallPathRenderer.h" #if 0 // This test case including path coords and matrix taken from crbug.com/627443. @@ -58,7 +58,7 @@ static void test_far_from_origin(GrContext* ctx, GrRenderTargetContext* renderTa pr->drawPath(args); } -DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(AADistanceFieldPathRenderer, reporter, ctxInfo) { +DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(SmallPathRenderer, reporter, ctxInfo) { GrContext* ctx = ctxInfo.grContext(); // The DF PR only works with contexts that support derivatives if (!ctx->caps()->shaderCaps()->shaderDerivativeSupport()) { @@ -74,10 +74,10 @@ DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(AADistanceFieldPathRenderer, reporter, ctxInfo) return; } - GrAADistanceFieldPathRenderer dfpr; + GrSmallPathRenderer spr; ctx->flush(); - test_far_from_origin(ctx, rtc.get(), &dfpr); + test_far_from_origin(ctx, rtc.get(), &spr); ctx->flush(); } #endif diff --git a/tools/flags/SkCommonFlagsPathRenderer.h b/tools/flags/SkCommonFlagsPathRenderer.h index 5e0d8fdecd..12755dcc06 100644 --- a/tools/flags/SkCommonFlagsPathRenderer.h +++ b/tools/flags/SkCommonFlagsPathRenderer.h @@ -20,7 +20,7 @@ DECLARE_string(pr); DEFINE_string(pr, "all", \ "Set of enabled gpu path renderers. Defined as a list of: " \ "[[~]all [~]dashline [~]nvpr [~]msaa [~]aahairline [~]aaconvex " \ - "[~]aalinearizing [~]sdf [~]tess [~]grdefault]") + "[~]aalinearizing [~]small [~]tess [~]grdefault]") inline GrContextOptions::GpuPathRenderers get_named_pathrenderers_flags(const char* name) { using GpuPathRenderers = GrContextOptions::GpuPathRenderers; @@ -38,8 +38,8 @@ inline GrContextOptions::GpuPathRenderers get_named_pathrenderers_flags(const ch return GpuPathRenderers::kAAConvex; } else if (!strcmp(name, "aalinearizing")) { return GpuPathRenderers::kAALinearizing; - } else if (!strcmp(name, "sdf")) { - return GpuPathRenderers::kDistanceField; + } else if (!strcmp(name, "small")) { + return GpuPathRenderers::kSmall; } else if (!strcmp(name, "tess")) { return GpuPathRenderers::kTessellating; } else if (!strcmp(name, "grdefault")) { diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index e190acd6c9..fecb14d59d 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -257,7 +257,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData) gPathRendererNames[GpuPathRenderers::kAll] = "Default Ganesh Behavior (best path renderer)"; gPathRendererNames[GpuPathRenderers::kStencilAndCover] = "NV_path_rendering"; gPathRendererNames[GpuPathRenderers::kMSAA] = "Sample shading"; - gPathRendererNames[GpuPathRenderers::kDistanceField] = "Distance field (small paths only)"; + gPathRendererNames[GpuPathRenderers::kSmall] = "Small paths (cached sdf or alpha masks)"; gPathRendererNames[GpuPathRenderers::kTessellating] = "Tessellating"; gPathRendererNames[GpuPathRenderers::kDefault] = "Original Ganesh path renderer"; gPathRendererNames[GpuPathRenderers::kNone] = "Software masks"; @@ -1065,7 +1065,7 @@ void Viewer::drawImGui(SkCanvas* canvas) { prButton(GpuPathRenderers::kNone); } else { prButton(GpuPathRenderers::kAll); - prButton(GpuPathRenderers::kDistanceField); + prButton(GpuPathRenderers::kSmall); prButton(GpuPathRenderers::kTessellating); prButton(GpuPathRenderers::kNone); } @@ -1300,7 +1300,7 @@ void Viewer::updateUIState() { prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kNone]); } else { prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kAll]); - prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kDistanceField]); + prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kSmall]); prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kTessellating]); prState[kOptions].append(gPathRendererNames[GpuPathRenderers::kNone]); } |