Fix line atlas (#2908)

This commit is contained in:
Tim Sylvester
2024-10-08 11:30:07 -07:00
committed by GitHub
parent 156872f4c8
commit eaa52d07c1
3 changed files with 12 additions and 14 deletions

View File

@@ -1,3 +1,5 @@
# Generated list files from code generation
/scripts/generate-style-code.list
/scripts/update-examples.list
vulkan.xcworkspace

View File

@@ -558,19 +558,17 @@ void RenderLineLayer::update(gfx::ShaderRegistry& shaders,
// texture
if (const auto& atlases = tile.getAtlasTextures(); atlases && atlases->icon) {
if (!iconTweaker) {
iconTweaker = std::make_shared<gfx::DrawableAtlasesTweaker>(
atlases,
std::nullopt,
idLineImageTexture,
/*isText*/ false,
/*sdfIcons*/ true, // to force linear filter
/*rotationAlignment_*/ AlignmentType::Auto,
/*iconScaled*/ false,
/*textSizeIsZoomConstant_*/ false);
}
auto iconTweaker = std::make_shared<gfx::DrawableAtlasesTweaker>(
atlases,
std::nullopt,
idLineImageTexture,
/*isText*/ false,
/*sdfIcons*/ true, // to force linear filter
/*rotationAlignment_*/ AlignmentType::Auto,
/*iconScaled*/ false,
/*textSizeIsZoomConstant_*/ false);
builder->addTweaker(iconTweaker);
builder->addTweaker(std::move(iconTweaker));
setSegments(builder, bucket);

View File

@@ -92,8 +92,6 @@ private:
gfx::ShaderGroupPtr lineGradientShaderGroup;
gfx::ShaderGroupPtr lineSDFShaderGroup;
gfx::ShaderGroupPtr linePatternShaderGroup;
gfx::DrawableTweakerPtr iconTweaker;
#endif
};