[core] RenderTile returns textures by const reference

This commit is contained in:
Mikhail Pozdnyakov
2019-05-28 15:30:14 +03:00
parent 43966f1611
commit 2f97a2660a
6 changed files with 19 additions and 17 deletions

View File

@@ -170,7 +170,7 @@ void RenderLineLayer::render(PaintParameters& parameters) {
} else if (!unevaluated.get<LinePattern>().isUndefined()) {
const auto& linePatternValue = evaluated.get<LinePattern>().constantOr(Faded<std::basic_string<char>>{ "", ""});
const Size& texsize = tile.getIconAtlasTexture()->size;
const Size& texsize = tile.getIconAtlasTexture().size;
optional<ImagePosition> posA = tile.getPattern(linePatternValue.from);
optional<ImagePosition> posB = tile.getPattern(linePatternValue.to);
@@ -187,7 +187,7 @@ void RenderLineLayer::render(PaintParameters& parameters) {
posA,
posB,
LinePatternProgram::TextureBindings{
textures::image::Value{ tile.getIconAtlasTexture()->getResource(), gfx::TextureFilterType::Linear },
textures::image::Value{ tile.getIconAtlasTexture().getResource(), gfx::TextureFilterType::Linear },
});
} else if (!unevaluated.get<LineGradient>().getValue().isUndefined()) {
assert(colorRampTexture);