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

14795 commits

Author SHA1 Message Date
reuk
14f663bc0e
CoreGraphics: Fix issue where text using simulated italic could be drawn at the wrong point
This was evident in the FontsDemo when using the CoreGraphics renderer,
selecting a font without an italic face, and enabling the italic style.
The glyph anchor positions were incorrectly transformed by the text
matrix, causing the left margin of the text to become tilted.

We now correct for the slant and scale specified in the text matrix when
computing glyph anchor positions.
2024-10-20 22:59:38 +01:00
reuk
07c863ac23 Javascript: Fix bug where properties of native objects could not be enumerated in JS 2024-10-16 17:28:14 +01:00
reuk
7f52509c78
Direct2D: Simplify SwapChain buffer creation 2024-10-16 10:36:53 +01:00
reuk
80ac9a78a0
Singleton: Add new macros to simplify singleton creation
The INLINE macros allow singletons to be declared and defined in one
line, without requiring a separate JUCE_IMPLEMENT_SINGLETON statement.
2024-10-16 10:36:52 +01:00
Tom Poole
5179f4e720 JUCE version 8.0.3 2024-10-15 22:20:16 +01:00
reuk
b770839e03 AAX Client: Update embedded SDK to 2.8.0 2024-10-15 22:19:51 +01:00
Tom Poole
17a3d0efe4 Resave all projects 2024-10-15 22:19:12 +01:00
Tom Poole
14c8d06fb0 Bump version number to 8.0.3 2024-10-15 22:16:12 +01:00
Tom Poole
0f3bad8152 Font: Avoid a crash on systems with no fonts installed 2024-10-15 14:27:23 +01:00
reuk
5453192a0c
JavaScript: Reinstate default max execution time of 15 seconds
It looks like the old default accidentally went missing in
 db3c2c6a52.
2024-10-15 11:45:12 +01:00
reuk
f5cc7902b1 Direct2D: Avoid using dirty rects when painting full frame
This fixes an issue where Direct2D will emit an error when using dirty
rects on the first full frame after resizing.

The issue isn't present on all hardware/drivers, but was observed on a
Windows 11 computer with a 890M iGPU.
2024-10-14 11:13:26 +01:00
attila
83dc660a30 Fonts: MacOS: Return styles in the order reported by the system
This is more likely to place the regular/default style first in the list
of styles. This change partially reverts a behavioural change in
68d0ea9dfb.
2024-10-10 17:53:10 +02:00
reuk
97cd4fc162
Direct2D: Reinstate multithreading support for D2D factory
Partially reverts a change made in
362a1cc070.

The factory needs to be multithreading-enabled in order to support e.g.
drawing to the screen on the main thread and drawing to an Image on a
background thread, even when no resources other than the graphics device
are shared between the two threads.
2024-10-10 16:11:24 +01:00
reuk
1e902bcdee
VST3: Avoid potential memory allocations during buffer remapping 2024-10-10 14:07:04 +01:00
reuk
ca8b5f7483 VST3 Host: Use correct path to .so on Linux
This fixes an issue where VST3 plugins failed to scan and load on Linux.
2024-10-10 13:18:11 +01:00
reuk
362a1cc070
Direct2D: Convert unnecessary multi-threaded factory to single-threaded 2024-10-10 11:47:18 +01:00
reuk
fa0ab06d41 Direct2D: Fix performance issue caused by the entire window painting unnecessarily 2024-10-09 18:13:46 +01:00
reuk
d22d287c6f Direct2D: Avoid presenting incomplete buffers after startFrame fails 2024-10-09 13:15:45 +01:00
reuk
b52f5cff21 WebBrowserComponent: Fix build issue on older linux platforms
Previously, building the DemoRunner on Ubuntu 18.04 failed due to a
missing type declaration.
2024-10-08 19:13:04 +01:00
reuk
77f3073d92
String: Fix unit test failure for random seed 0xaccaaad0444426fa 2024-10-08 17:32:42 +01:00
reuk
c57041e5bc
Direct2D: Simplify threading of swapchain presentation
Previously, IDXGISwapChain::Present was called on a background thread,
which made it difficult to avoid race conditions. e.g. during a
live-resize of a window, we would occasionally draw old incomplete
frames instead of new frames at the correct size.

The new approach moves the Present call to the main thread via
AsyncUpdater. We attempt to present whenever the swap event wakes, and
whenever a frame is drawn. Only a single Present call may be made after
the swap event wakes. Subsequent Present calls will be ignored until the
next time the swap event wakes.
2024-10-08 16:10:07 +01:00
reuk
c7f7a7c1bb
Direct2D: Remove setResizing and getResizing members from renderer
We instead query from the renderer whether the current render size has
changed since the last frame, and repaint the entire window if so.
2024-10-07 11:50:26 +01:00
reuk
7e73ed7c36
iOS Audio: Use hard-coded set of potential block sizes to avoid slow hardware queries 2024-10-04 14:37:58 +01:00
attila
70c9c5bfdb
iOS Audio: Add waiting mechanism after AVAudioSession setActive: to ensure correct buffer size detection on iOS 18
The waiting is only added on iOS 18 as this is the only platform where
seems to be an asynchronous relationship between
(1) AVAudioSession setActive:
(2) AVAudioSession setPreferredIOBufferDuration:
and (3) AVAudioSession.IOBufferDuration.

The issue is not observable in the iOS 18 emulator.
2024-10-03 17:46:49 +01:00
reuk
d3e254e24f
iOS Audio: Request exactly the desired buffersize, to avoid an issue where iOS 18 fails to apply non-power-of-2 sizes 2024-10-03 17:46:49 +01:00
attila
171edbec7f MacOS: Suppress deprecation warnings related to NSUserNotification
All NSUserNotification related classes have been deprecated in MacOS 11,
and this class will have to be revamped to use the new User
Notifications framework. We are suppressing the warnings for the time
being.
2024-10-03 16:56:34 +02:00
attila
46eed81aae Windows: WebBrowserComponent: Avoid infinite loops caused by CONNECTION_ABORTED errors
WebView2 can emit COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED
errors during page navigation, even if the page navigation would happen
correctly afterwards. In such situations our internal error handler can
recursively encounter this error when trying to navigate to the error
handler page.

Prior to this commit the implementation could end up in an infinite loop
receiving the error and then navigating to the error handler page.
2024-10-03 16:56:34 +02:00
Anthony Nicholls
c545ca0492 CoreGraphics: Prevent an assertion when creating a rounded rectangle 2024-10-03 08:36:14 +01:00
reuk
fdf74a7477
Windowing: Reinstate old WindowFromPoint behaviour in ComponentPeer::contains
This reverts 515e9b9f89.

In order to avoid recursive calls through WM_NCHITTEST, we remove calls
to Component::contains in DocumentWindow::findControlAtPoint.
2024-10-02 11:35:39 +01:00
reuk
ad5a755b10
Viewport: Avoid stack overflows when displaying transformed content components
For some transforms, the program could get stuck in the following loop:
- The content component emits a resized/moved notification, leading to
  the initial call to Viewport::updateVisibleArea.
- New positions are computed for the viewport scrollbars, and scrollbar
  listeners are notified synchronously that the scrollbars have been
  updated.
- The viewport itself listens to the scrollbars, so it receives a
  notification and updates the position of the content component.
- The scrollbar position (quantised to an integer) resolves to a
  component position (also quantised to an integer) that differs from
  the existing position, so the new position is applied.
- The viewport now attempts to set the scrollbars to the correct
  position in response, and notifies listeners that the scrollbars
  have moved...

Normally, the recursion would exit at the point where the component position
is set to its current position. If we're unlucky, though, converting
from view pos to scrollbar pos, then scrollbar pos back to view pos may
result in a view pos that differs from the original value.

This fix adds a new exit condition from the recursion. On receiving a
scrollbar move notification, we check whether the scrollbar position
computed from the current view position matches the incoming scrollbar
position. If it does, there's no need to compute and apply a new view
position from the incoming scrollbar position.
2024-10-02 11:35:38 +01:00
reuk
27d877c175
DirectWrite: Return styles in the order reported by the system
This is more likely to place the regular/default style first in the list
of styles.
2024-10-02 11:35:38 +01:00
reuk
14dc97a29e
DirectWrite: Attempt to match font styles manually before falling back to system implementation
This allows for styles other than normal/bold/italic/bold-italic to be
selected, and more closely matches the behaviour of font selection on
other platforms.
2024-10-02 11:35:38 +01:00
reuk
1a1dc90a24
Direct2D: Remove frameSize member from Direct2DHwndContext pimpl 2024-10-02 11:35:38 +01:00
reuk
9b36effbf4
Direct2D: Make checkPaintReady check more robust
This additionally ensures that we'll paint when the swap chain has just
been resized
2024-10-02 11:35:38 +01:00
reuk
d64e963b14
Direct2D: Tidy up rect/point creation 2024-10-02 11:35:38 +01:00
reuk
102ef24061
Direct2D: Avoid unnecessarily reallocating window buffers during window move 2024-10-02 11:35:37 +01:00
reuk
2a2ae47231
Fonts: Fix freetype compilation issues on Debian 10 2024-10-02 11:16:55 +01:00
attila
df024aaf3b VST3 Host: Fix growing windows due to inaccurate coordinate operations
Prior to this commit we used the integral version of localAreaToGlobal
before multiplying its result by the scale factor. This multiplied the
rounding error of localAreaToGlobal<int> by the scale factor. Now we
only round after all calculations have been carried out.
2024-10-01 13:53:25 +02:00
attila
2c9b15e52c VST3 Client: Fix drifting and growing windows due to inaccurate constrainer operations
The input coordinates were unnecessarily converted and truncated to
integral values before follow up calculations, and then a final
conversion back to integral values.
2024-10-01 13:53:25 +02:00
reuk
d6e37d78b8
AAX Client: Update embedded SDK to 2.8.0 2024-09-30 20:37:43 +01:00
reuk
646179c663
BigInteger: Fix implementation of exponentModulo 2024-09-30 20:37:43 +01:00
reuk
14ddfe2c22 DialogsDemo: Add scope around Graphics instance to ensure drawing is flushed to image before use 2024-09-30 20:12:52 +01:00
reuk
9cf7889422 ContentSharer: Use SEND instead of SEND_MULTIPLE when sharing individual files 2024-09-30 20:12:51 +01:00
reuk
c02ec2e3d5 DocumentWindow: Ensure button callbacks are called on Windows 2024-09-30 20:12:51 +01:00
reuk
1798b12d4b VST3 Client: Fix build failure when JUCE_PLUGINHOST_VST3=1 is defined 2024-09-30 20:12:51 +01:00
reuk
f5f758c032 Partially revert "ComponentPeer: Add isShowing() member, which more closely matches expected behaviour of Component::isShowing"
This partially reverts commit 555b667d22.

Using ComponentPeer::isShowing instead of ComponentPeer::isMinimised
inside Component::isShowing can cause problems when displaying OpenGL
components.

Specifically, OpenGL components use a ComponentMovementWatcher to
determine when they should be attached/detached from the parent window.
The ComponentMovementWatcher updates whenever a component visibility
change event is emitted, which happens in two cases:
- Component::setVisible is called on the OpenGL component or an ancestor
- ComponentPeer::handleMovedOrResized is called in response to a
  minimisation state change

When handling either of these events, the ComponentMovementWatcher will
call Component::isShowing to determine whether or not the component is
really showing.

The problem is that the result of ComponentPeer::isShowing may change
independently of changes to the Component visiblity state or
ComponentPeer minimisation state, so the ComponentPeerWatcher might not
notify its listeners when a component is really shown/hidden.

One potential workaround would be for the ComponentPeer to send
notifications when the showing state of the window changes, so that the
ComponentMovementWatcher can forward those notifications. The main
problem with this approach is that on Windows, the window doesn't seem
to receive a message on hide/show, and it's not clear whether there
exists some other approach to detect a hide/show event.

If there were some event we could listen for on Windows, then we could
call Component::sendVisibilityChangeMessage in response to this event
and things would *likely* work at that point, but this may still have
unintended side-effect. As a result, I think the best approach to
restore the old behaviour is to revert the change to
Component::isShowing. The implementations of ComponentPeer::isShowing
have been left in place so that users can do still query the real
visibility state of native windows if necessary.
2024-09-30 19:50:37 +01:00
Anthony Nicholls
77d4198091 Text: Refactor UTF-8 test to prevent warnings 2024-09-30 12:49:57 +01:00
Tom Poole
7d3affbcb3 Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
Anthony Nicholls
6c2d149ef3 Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
Tom Poole
4ada2e1f4d JUCE version 8.0.2 2024-09-26 08:47:46 +01:00