1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00
Commit graph

14428 commits

Author SHA1 Message Date
reuk
9112911122
MinGW: Remove support 2024-06-27 18:10:21 +01:00
reuk
8a4ec206f2
Projucer: Remove GUI Editor 2024-06-27 18:10:21 +01:00
reuk
813b01e3d8
Projucer: Remove Visual Studio 2017 exporter 2024-06-27 18:10:21 +01:00
reuk
ffc5061937
Projucer: Remove Code::Blocks exporter 2024-06-27 18:10:19 +01:00
attila
3c4aa8d0ce TextLayout: Preserve leading whitespaces
This fixes the CodeEditorComponent regression present since
03e79f8f12.
2024-06-27 15:31:57 +00:00
attila
ef8417023e Represent tab characters with non-breaking space during shaping
This avoids assertions raised when shaping text containing tabs.
2024-06-27 15:31:57 +00:00
Anthony Nicholls
0d8f2c63ec ListenerList: Assert if initialisation could throw for any reason other than a bad allocation 2024-06-27 14:17:37 +01:00
Anthony Nicholls
06fb8f4ea2 ListenerList: Fix a bug where removing a listener during a callback in which it had also been added prevents other listeners from being called 2024-06-27 14:14:25 +01:00
Anthony Nicholls
43762c7575 ListenerList: Move unit tests into separate file 2024-06-27 14:14:25 +01:00
reuk
7bb71cc1ba Direct2D: Make path-rendering behaviour consistent with CoreGraphics and the software renderer
The other renderers implicitly start a new supath at the last path
location when a line or bezier segment is added without explicitly
starting a new subpath.
2024-06-26 14:33:26 +01:00
reuk
815da2ec6d Direct2D: Tidy up clearWindowRedirectionBitmap 2024-06-26 14:33:26 +01:00
reuk
fe1a11908e Direct2D: Fix data race when creating Direct2DPixelData instances on a background thread 2024-06-26 14:33:25 +01:00
Matt Gonzalez
0789048777 Direct2D: Set transform for tiled image brush 2024-06-26 14:33:25 +01:00
reuk
9ae52f3d7a Direct2D: Update backbuffer implementation
Problem description
===================

Firstly, the linked-list of pending presentations acted as a stack
(FILO).  If the swap chain thread and main thread processed frames at
varying rates, then the following sequence of events was possible:

Main thread           Swap chain thread       Queue state
---------------------------------------------------------
Push frame (1)                                [1]
Push frame (2)                                [2, 1]
                      Pop frame (2)           [1]
Push frame (3)                                [3, 1]
                      Pop frame (3)           [1]
                      Pop frame (1)           [] <--  Out of sequence!

Secondly, the swap chain's sequential flip model can only maintain a
valid back-buffer state as long as the list of dirty rects is correct,
and every pixel within the dirty rects is painted incrementally.

In the example above, if the main thread were to produce two frames
before the swap chain thread could present any frame, then presenting
*only* the frame 2 (skipping frame 1) may produce incorrect results when
combined with the existing back buffer. This is because regions updated
in frame 1 may not be updated in frame 2, so regions *only* updated in
frame 1 will be omitted from the back buffer.

Mitigation
==========

This patch removes the old stack of presentations and replaces it with a
slightly more complex mechanism that tracks two different Presentation
objects. At any time, up to one Presentation may be in use by the swap
chain thread (i.e. actively presenting), up to one Presentation may be
accumulating updated/dirty regions (i.e. painting), and up to one region
may be ready, awaiting display.

This scheme resolves the first issue described above by ensuring that
old frame data is not kept around. There is never more than one frame
awaiting display, which means that if the swap chain thread attempts to
display twice in a row (before the main thread produces a new frame),
the second attempt will be a no-op.

The second issue is resolved by accumulating changes into a single
Presentation whenever the main thread produces two or more frames in a
row. If there is already a 'ready' Presentation when the main thread
finishes painting, then all updated regions from the newest Presentation
will be added to the 'ready' Presentation, rather than replacing it.
When the swap chain thread is ready to present, it will therefore see
the result of all the accumulated Presentations produced by the main
thread, instead of just the newest Presentation.
2024-06-26 14:33:25 +01:00
reuk
515e9b9f89 Windowing: Avoid recursively calling WM_NCHITTEST in contains() 2024-06-26 14:33:25 +01:00
attila
adbb0850ed Fix compilation error with C++20 2024-06-24 15:07:16 +00:00
reuk
1019614dcd
URLConnectionState: Use a shared NSURLSession to improve performance 2024-06-24 12:50:02 +01:00
reuk
1e3703fe64
URLConnectionState: Simplify and improve thread safety 2024-06-20 17:52:23 +01:00
reuk
ae75e27948
Network: Remove code for compatibility with unsupported platforms 2024-06-20 17:52:23 +01:00
reuk
225f1526ee
Component: Avoid creating ModalComponentManager unnecessarily 2024-06-20 17:52:23 +01:00
reuk
fd01869cfd
AU Client: Avoid creating ModalComponentManager during shutdown
The ScopedJuceInitialiser may have been destroyed before shutdown is
called, in which case singletons will have been deleted and cleared.
Attempting to access the ModalComponentManager here will recreate it,
and will trigger a leak detector warning later on.
2024-06-20 17:52:23 +01:00
reuk
2301f398aa
Fonts: Replace heavyweight leak detector in FTFaceWrapper 2024-06-20 17:52:22 +01:00
Tatsuya Shiozawa
131b838c65
String: Use string length during UTF8 conversion
This implementation is equivalent to JUCE 7.
2024-06-20 17:52:22 +01:00
attila
4828bd886d Fix assertion during Font fallback
Since 4122427748 assertions are guarding
the FontOptions::withName, withStyle and withTypeface member functions.

Since then the only way to replace an existing typeface without hitting
these assertions is to clear all three fields before calling
withTypeface, which then sets all three values. It is always legal to
just clear an existing Typeface and rely on the name and style fields.
2024-06-20 08:45:17 +00:00
reuk
df45c4ae9f
AnimationEasingDemo: Fix shadowing warnings 2024-06-19 16:00:40 +01:00
reuk
308619fb5f
TextLayout: Fix unused variable warning 2024-06-19 15:06:23 +01:00
attila
453e57bade Add erase() and drop() to Ranges and RangedValues 2024-06-18 15:29:42 +02:00
Anthony Nicholls
4e106a76e8 AudioUnit (host): Prevent a warning from using bitwise operations with different enum types 2024-06-13 16:09:38 +00:00
Anthony Nicholls
29cb346db2 ListenerList: Prevent a data race while clearing the list 2024-06-13 11:22:04 +01:00
Tom Poole
6ec5c0216b Resave all projects 2024-06-13 07:42:58 +01:00
reuk
a904aa592f
DocumentWindow: Allow custom titlebar controls to respond to mouse
Prior to this change, the 'options' button in the StandaloneFilterWindow
border did not respond to mouse clicks on Windows.
2024-06-12 19:16:32 +01:00
reuk
473da34dfa
InAppPurchases: Update Android implementation to support GPB 7.0.0
Also updates the Projucer's Android exporter to update Google Play
Billing Library dependency to 7.0.0.
2024-06-12 19:16:32 +01:00
reuk
07be00db7d
Projucer: Update recommended Gradle and Android Plugin versions 2024-06-12 19:16:32 +01:00
reuk
d3add9900a
Projucer: Enable AndroidX in gradle.properties to silence Google Play Billing warning
Without this change, a warning is raised during the build that a
dependency uses AndroidX but the main project does not.
2024-06-12 19:16:32 +01:00
reuk
15f28d71f2
Projucer: Switch from deprecated compileSdkVersion to new compileSdk 2024-06-12 19:16:31 +01:00
reuk
e5c32e3490
VST3 Host: Refresh parameter info after receiving kParamTitlesChanged 2024-06-12 19:16:31 +01:00
reuk
1d90ea72e7
VST3 Client: Update ParameterInfo default value and numSteps when AudioProcessor changes 2024-06-12 19:16:31 +01:00
reuk
bf384427d1 AU Client: Avoid repetition of function implementations 2024-06-12 11:24:16 +01:00
reuk
a66fd53630 AU Client: Report correct AUChannelInfo for MIDI FX plugins
Previously, MIDI FX would report an input and output channel count of 0.
However, a non-empty output bus is required in order to retrieve the
processing sample rate.

With this change in place, MIDI FX plugins will now report an output
channel count of -1, which indicates that any number of output channels
is valid.
2024-06-12 11:24:16 +01:00
reuk
203934d949 HarfBuzz: Enable atexit to silence some CRT debug memory leak warnings
Before this change, after running a JUCE app on Windows under a
debugger, and quitting it normally (e.g. pressing the close title
button), the output log would display some memory leak diagnostics. This
is because HarfBuzz expects to clean up statics using atexit, but atexit
was not enabled. This change enables atexit on supported platforms,
including Windows.
2024-06-12 11:24:16 +01:00
Tom Poole
61a03097ec JUCE version 8.0.0 2024-06-12 09:37:48 +01:00
Tom Poole
9e3b1985ca Update change list 2024-06-12 09:35:32 +01:00
Tom Poole
05b036272a Fix some Doxygen docstrings 2024-06-12 09:35:32 +01:00
Anthony Nicholls
4808fdce30 CoreAudio: Prevent racing between calls to start and stop a device 2024-06-12 09:35:32 +01:00
Tom Poole
16dac4aeb2 Merge the develop branch 2024-06-12 08:09:07 +01:00
attila
244af32715 AU Client: Suppress EnumCastOutOfRange Clang Analyzer warning 2024-06-12 08:08:32 +01:00
attila
2516ad808e WebBrowserComponent: Linux: Add support for libwebkit2gtk-4.1 2024-06-11 20:51:22 +02:00
attila
b5cbdfd980 ResizableWindow: Fix window becoming non-resizable when a constrainer is added
This is fixing a regression in f764026626.
2024-06-11 20:49:56 +02:00
Anthony Nicholls
59e98710f0 AudioUnit (host): Prevent potential out of bounds memory access
Reading or writing the kAudioUnitProperty_AudioChannelLayout property
could result in out-of-bounds reads or writes as AudioChannelLayout
has a variable length array as the last member of the struct
2024-06-11 15:30:06 +00:00
Anthony Nicholls
b7d5f64a8e CoreAudio: Prevent racing between calls to start and stop a device 2024-06-11 16:13:06 +01:00