Skip to content

Commit

Permalink
update tgfx to lastest commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hparty committed Nov 11, 2024
1 parent 30b642d commit d41fdd8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"url": "${PAG_GROUP}/tgfx.git",
"commit": "4283c4847a3e647efd99fbed2abd58085deb917b",
"commit": "0ee494ab8246bb051e66b4681832ebcac18b8e39",
"dir": "third_party/tgfx"
},
{
Expand Down
5 changes: 2 additions & 3 deletions src/rendering/graphics/Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 2 additions & 4 deletions src/rendering/renderers/ShapeRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
}
Expand Down

0 comments on commit d41fdd8

Please sign in to comment.