Skip to content

Commit

Permalink
Small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Nov 18, 2024
1 parent aae5611 commit e86afa4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/main/x11/X11CairoSurface.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2020 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 25 окт. 2016 г.
Expand Down Expand Up @@ -1290,9 +1290,9 @@ namespace lsp
if ((pCR == NULL) || (n < 2))
return;

cairo_move_to(pCR, *(x++), *(y++));
cairo_move_to(pCR, x[0], y[0]);
for (size_t i=1; i < n; ++i)
cairo_line_to(pCR, *(x++), *(y++));
cairo_line_to(pCR, x[i], y[i]);

setSourceRGBA(color);
cairo_fill(pCR);
Expand All @@ -1303,9 +1303,9 @@ namespace lsp
if ((pCR == NULL) || (n < 2) || (gr == NULL))
return;

cairo_move_to(pCR, *(x++), *(y++));
cairo_move_to(pCR, x[0], y[0]);
for (size_t i=1; i < n; ++i)
cairo_line_to(pCR, *(x++), *(y++));
cairo_line_to(pCR, x[i], y[i]);

X11CairoGradient *cg = static_cast<X11CairoGradient *>(gr);
cg->apply(pCR);
Expand All @@ -1317,9 +1317,9 @@ namespace lsp
if ((pCR == NULL) || (n < 2))
return;

cairo_move_to(pCR, *(x++), *(y++));
cairo_move_to(pCR, x[0], y[0]);
for (size_t i=1; i < n; ++i)
cairo_line_to(pCR, *(x++), *(y++));
cairo_line_to(pCR, x[i], y[i]);

setSourceRGBA(color);
cairo_set_line_width(pCR, width);
Expand All @@ -1331,9 +1331,9 @@ namespace lsp
if ((pCR == NULL) || (n < 2))
return;

cairo_move_to(pCR, *(x++), *(y++));
cairo_move_to(pCR, x[0], y[0]);
for (size_t i=1; i < n; ++i)
cairo_line_to(pCR, *(x++), *(y++));
cairo_line_to(pCR, x[i], y[i]);

if (width > 0.0f)
{
Expand Down Expand Up @@ -1615,8 +1615,8 @@ namespace lsp
}

}
}

} /* namespace ws */
} /* namespace lsp */

#endif /* defined(USE_LIBX11) && defined(USE_LIBCAIRO) */

0 comments on commit e86afa4

Please sign in to comment.