diff --git a/CMakeLists.txt b/CMakeLists.txt index 37a524b7cb..e989e4546e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,7 +147,7 @@ file(GLOB COMMON_FILES src/platform/*.*) list(APPEND PAG_FILES ${COMMON_FILES}) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - list(APPEND PAG_COMPILE_OPTIONS -Wall -Wextra -Weffc++ -pedantic -Werror=return-type -Wno-unused-command-line-argument) + list(APPEND PAG_COMPILE_OPTIONS -Werror -Wall -Wextra -Weffc++ -pedantic -Werror=return-type -Wno-unused-command-line-argument) endif () if (MSVC) diff --git a/DEPS b/DEPS index eea70a39b7..998b98e785 100644 --- a/DEPS +++ b/DEPS @@ -12,7 +12,7 @@ }, { "url": "${PAG_GROUP}/tgfx.git", - "commit": "4283c4847a3e647efd99fbed2abd58085deb917b", + "commit": "0ee494ab8246bb051e66b4681832ebcac18b8e39", "dir": "third_party/tgfx" }, { diff --git a/src/rendering/graphics/Text.cpp b/src/rendering/graphics/Text.cpp index 8209a08cff..cf85528d4e 100644 --- a/src/rendering/graphics/Text.cpp +++ b/src/rendering/graphics/Text.cpp @@ -161,9 +161,8 @@ static void ApplyPaintToPath(const tgfx::Paint& paint, tgfx::Path* path) { return; } auto strokePath = *path; - auto strokeEffect = paint.getStroke(); - if (strokeEffect) { - strokeEffect->applyToPath(&strokePath); + if (const auto stroke = paint.getStroke()) { + stroke->applyToPath(&strokePath); } *path = strokePath; } diff --git a/src/rendering/renderers/ShapeRenderer.cpp b/src/rendering/renderers/ShapeRenderer.cpp index 79108d19ec..4d3c40101f 100644 --- a/src/rendering/renderers/ShapeRenderer.cpp +++ b/src/rendering/renderers/ShapeRenderer.cpp @@ -835,10 +835,7 @@ void ApplyStrokeToPath(tgfx::Path* path, const StrokePaint& stroke) { effects.emplace_back(std::move(dashEffect)); } } - stroke.getStroke().applyToPath(path); - if (effects.empty()) { - return; - } + auto strokeData = stroke.getStroke(); auto applyMatrix = false; if (!stroke.matrix.isIdentity()) { auto matrix = tgfx::Matrix::I(); @@ -850,6 +847,7 @@ void ApplyStrokeToPath(tgfx::Path* path, const StrokePaint& stroke) { for (const auto& effect : effects) { effect->filterPath(path); } + strokeData.applyToPath(path); if (applyMatrix) { path->transform(stroke.matrix); }