@@ -219,6 +219,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
219
219
{
220
220
SkGraphics::Init ();
221
221
222
+ gPathRendererNames [GpuPathRenderers::kDefault ] = " Default Path Renderers" ;
222
223
gPathRendererNames [GpuPathRenderers::kAll ] = " All Path Renderers" ;
223
224
gPathRendererNames [GpuPathRenderers::kStencilAndCover ] = " NV_path_rendering" ;
224
225
gPathRendererNames [GpuPathRenderers::kSmall ] = " Small paths (cached sdf or alpha masks)" ;
@@ -875,7 +876,7 @@ void Viewer::updateTitle() {
875
876
title.append (" ]" );
876
877
877
878
GpuPathRenderers pr = fWindow ->getRequestedDisplayParams ().fGrContextOptions .fGpuPathRenderers ;
878
- if (GpuPathRenderers::kAll != pr) {
879
+ if (GpuPathRenderers::kDefault != pr) {
879
880
title.appendf (" [Path renderer: %s]" , gPathRendererNames [pr].c_str ());
880
881
}
881
882
@@ -1563,13 +1564,15 @@ void Viewer::drawImGui() {
1563
1564
if (!ctx) {
1564
1565
ImGui::RadioButton (" Software" , true );
1565
1566
} else if (fWindow ->sampleCount () > 1 ) {
1567
+ prButton (GpuPathRenderers::kDefault );
1566
1568
prButton (GpuPathRenderers::kAll );
1567
1569
if (ctx->priv ().caps ()->shaderCaps ()->pathRenderingSupport ()) {
1568
1570
prButton (GpuPathRenderers::kStencilAndCover );
1569
1571
}
1570
1572
prButton (GpuPathRenderers::kTessellating );
1571
1573
prButton (GpuPathRenderers::kNone );
1572
1574
} else {
1575
+ prButton (GpuPathRenderers::kDefault );
1573
1576
prButton (GpuPathRenderers::kAll );
1574
1577
if (GrCoverageCountingPathRenderer::IsSupported (
1575
1578
*ctx->priv ().caps ())) {
@@ -2074,6 +2077,7 @@ void Viewer::updateUIState() {
2074
2077
} else {
2075
2078
const auto * caps = ctx->priv ().caps ();
2076
2079
2080
+ writer.appendString (gPathRendererNames [GpuPathRenderers::kDefault ].c_str ());
2077
2081
writer.appendString (gPathRendererNames [GpuPathRenderers::kAll ].c_str ());
2078
2082
if (fWindow ->sampleCount () > 1 ) {
2079
2083
if (caps->shaderCaps ()->pathRenderingSupport ()) {
0 commit comments