7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00
Commit Graph

866 Commits

Author SHA1 Message Date
Wayne Stambaugh
5c8f4697ca Common folder housekeeping part 1. 2025-01-12 12:06:45 -05:00
John Beard
3b490cdd3b Eeschema: yeet wire-with-plus icon
This icon was only used for auto-starting a wire, which was
inconsistent with auto-starting a bus or graphic line.

Also the plus sign is a little confusing as it could also be
interpreted as the origin marker (which is really bottom left),
which is also plus-shaped.
2025-01-11 00:34:48 +08:00
Seth Hillbrand
09e30adbb1 Move GL_CONTEXT_MGR into PGM_BASE singleton
This is the second try at 5326c36a5f.  The difference here is that we
have moved GL_CONTEXT_MGR into kicommon first which will hopefully
address some of the Windows linkage issues

The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-09 09:03:08 -08:00
Seth Hillbrand
d48c40ba26 Move GL_CONTEXT_MANAGER to kicommon 2025-01-09 09:03:08 -08:00
Seth Hillbrand
452e69de85 Move thread pool into true singleton
Thread pool needs to be stored in a single location for all of KiCad
otherwise each kiface will spin up its own pool of persistent threads
2025-01-09 09:03:08 -08:00
Seth Hillbrand
074e6df3bc Revert "Move thread pool to singleton class"
This reverts commit 361f61a023.
2025-01-03 21:22:44 -08:00
Seth Hillbrand
f38e661a02 Revert "Move GL Context into Singleton class"
This reverts commit 5326c36a5f.
2025-01-03 21:22:37 -08:00
Seth Hillbrand
5326c36a5f Move GL Context into Singleton class
The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-03 17:26:23 -08:00
Seth Hillbrand
361f61a023 Move thread pool to singleton class
Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started.  Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.

The singleton class can be extended to provide single instance
guarantee for any element across kifaces
2025-01-03 13:51:11 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
jean-pierre charras
2cd28009ef Define MAX_LAYERS_FOR_VIEW to init GAL::Mxx_DEPTH and VIEW_MAX_LAYERS
These values MIN_DEPTH, MAX_DEPTH and VIEW_MAX_LAYERS are coupled, so to
avoid mismatch, it is better to derive these values from an unique value
2024-12-30 16:59:32 +01:00
John Beard
3219e87b3a GAL: update depth to avoid overflow with a higher VIEW_MAX_LAYERS 2024-12-30 20:23:16 +08:00
Jeff Young
7a4b3602b9 Reduce dependency on dynamic_cast.
(3DViewer crosses compile boundaries when run from
CvPCB.)
2024-12-05 18:17:02 +00:00
Alex Shvartzkop
55ca13e7cf Revert "Support hidpi in Cairo GAL canvas; performance improvements."
This reverts commit 8e90063258.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19150
2024-12-02 22:44:20 +03:00
Seth Hillbrand
9e72d426db Remove C macro in favor of class template 2024-11-21 18:04:23 -08:00
John Beard
dbf68a80b8 GAL: also scope layer depth push/pops
This means that an early return or an exception between
a manual Push/Pop (or an omission of the Pop) cannot
corrupt the layer stack.

It also means the GAL doesn't have to maintain its own
stack (with the in-scope GAL_SCOPED_ATTRS taking that role).

Reomve the Push/PopDepth functions, as they're only ever
used in pairs, and doing it manually needs more care.
2024-11-04 20:41:44 +08:00
John Beard
4bad76825c Standardise clamp function
std::clamp and alg:clamp had different argument orders.
Since std::clamp is constexpr, we might as well just use
that now we have it.
2024-10-09 21:27:58 -06:00
Mike Williams
53022ab347 mouse settings: add reverse zoom option
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18583
2024-09-23 17:09:44 +00:00
Marek Roszko
89a3b7baa5 Move some things starting from reporter to kicommon 2024-09-02 21:15:14 -04:00
Mark Roszko
c19aa8170b Revert "Move some things starting from reporter to kicommon"
This reverts commit 3d893254e9
2024-08-28 01:21:40 +00:00
Marek Roszko
3d893254e9 Move some things starting from reporter to kicommon 2024-08-27 20:33:08 -04:00
Jeff Young
b549c4feec Drawing sheet can't share glyph cache entries with editors.
(They use different internal units.)

Also fixes a fialure of CAIRO_GAL to reset the fill
and stroke after drawing outline glyphs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18579
2024-08-22 12:23:21 -06:00
Alex Shvartzkop
e5a5b59ac1 Don't try to clear empty bitmap cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18310
2024-07-01 18:23:19 +03:00
Alex Shvartzkop
0acc4dc286 If we didn't use all reserved vertices in OpenGL GAL, show the error to user.
It will cause graphical artifacts, and it's not clear to what's happening if the message is never shown.

See https://gitlab.com/kicad/code/kicad/-/issues/18298
2024-06-28 23:15:47 +03:00
Alex Shvartzkop
73a3b880a6 Slightly optimize GPU_CACHED_MANAGER::DrawIndices. 2024-06-12 16:04:47 +03:00
Alex Shvartzkop
d40bbed591 Cairo GAL: improve alignment between arcs and segments and of odd-width lines.
(cherry picked from commit f60b76696a)
2024-06-10 21:26:17 +03:00
Alex Shvartzkop
4b96bb5d8f Support touchscreen gestures (zoom/pan/rotate) in 3D viewer.
Though rotate doesn't work yet on MSW due to a wxWidgets bug.
2024-06-08 21:13:16 +03:00
Alex Shvartzkop
8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Alex Shvartzkop
8e90063258 Support hidpi in Cairo GAL canvas; performance improvements.
We now draw onto wxBitmap directly, reducing the amount of copying.
Also moves the bitmap blit into paint event handler.
Modifies ClearScreen to work universally between Cairo/OpenGL backends.
2024-06-08 12:51:27 +03:00
Jeff Young
931de12072 Use wxWidgets to track DPI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17981
2024-05-31 17:08:43 +01:00
Seth Hillbrand
ab0426d620 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16231
2024-05-26 07:51:15 -07:00
Wayne Stambaugh
795a9eea60 Coding policy fixes.
This is primarily to change all instances of wxLogDebug with wxLogTrace
so developers do not have to sift through debugging output that is always
dumped.  The only exception is for code blocks built in debug builds and
called on demand for dumping object states.
2024-05-23 07:59:45 -04:00
Alex Shvartzkop
5e14ae9698 Add OpenGL info to About. 2024-05-05 21:30:25 +03:00
Alex Shvartzkop
b905b4eac8 Improve moving, rendering and plotting of very small angle arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17110
2024-04-03 00:40:18 +03:00
Ian McInerney
9e597ea754 Add the option to use alternating row colors in tables/grids
ADDED: Option to use alternating row colors in tables/grids

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16739
2024-04-01 21:59:37 +01:00
Alex Shvartzkop
bf6ff5b805 Do not write alpha to the main framebuffer when performing antialiasing.
This allows correct background display when the main framebuffer has alpha.
Noticeable on Wayland with Mesa 24.0.2 Iris driver.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17341
2024-03-12 08:04:56 +03:00
Alex Shvartzkop
f6f0b9a661 ADDED: PCB 3D image raytracing rendering from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3691
2024-03-08 14:38:18 +00:00
Yon Uriarte
77576e1a80 Responsive: OPENGL_GAL::DrawArc reserve linequads to reduce drawing time 2024-03-05 14:15:33 +00:00
Alex Shvartzkop
80457d5871 Support transparent background in 3D viewer PNG/clipboard export.
Only really works with realtime renderer currently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12060
2024-02-29 17:11:53 +03:00
Alex Shvartzkop
97e3139505 Cairo GAL: fix endianness check.
(cherry picked from commit c4a7af8a47)
2024-02-28 01:11:27 +00:00
Alex Shvartzkop
3582edb185 Cairo GAL: reduce buffer allocation sizes.
cairo_format_stride_for_width() result is in bytes.
Also removes unneeded extra width.


(cherry picked from commit d359fb8ab9)
2024-02-28 00:53:56 +00:00
Alex Shvartzkop
4fed2e849f Cairo GAL: improve empty canvas performance (-80% CPU)
(cherry picked from commit 5618a6925d)
2024-02-28 00:53:51 +00:00
Jeff Young
e7abeb3c38 Cleanup. 2024-02-24 20:05:51 +00:00
Jeff Young
ffa6adec96 Add a cache for TrueType contours and triangulation data.
Also returns minimumSegmentLength to its former value as
it doesn't appear to be required to fix
https://gitlab.com/kicad/code/kicad/-/issues/11463.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16568
(cherry picked from commit 162e8962f7)
2024-02-23 16:53:29 +01:00
Jeff Young
7fbeea0195 Allow smaller grid dots on Retina displays. 2024-01-19 20:37:27 +00:00
Jon Evans
e29baa75b4 Scale GAL grid with DPI 2024-01-19 12:20:13 -05:00
Alex Shvartzkop
5bd620d8f9 Support Bezier curve editing in eeschema. 2024-01-16 14:11:25 +03:00
Marek Roszko
21647f54e9 Rename the gal output to kigal 2024-01-13 11:35:59 -05:00
Jeff Young
5aae8e2fd0 Code cleanup. 2024-01-04 16:13:42 +00:00
Alex Shvartzkop
965576f2c6 Enable alpha test for bitmaps in OpenGL GAL. 2023-12-31 15:05:00 +05:00