The same run loop may be registered multiple times, e.g. if the host
passes the same run loop pointer to multiple instances of the plugin.
When a particular run loop client goes out of scope, it should only
remove its own reference to the run loop, because other clients may
still be active and still using that run loop.
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.
Previously, if the AudioProcessor had disabled buses, the AUv3 wrapper
would attempt to create zero-channel buses to represent the JUCE buses,
which failed.
With this change in place, disabled buses will be created with their
default layout, and then explicitly disabled.
The default background colour of the WebBrowserComponent is white on all
platforms. Before the first page finishes loading this is the colour
that should fill the WebBrowserComponent's area.
Prior to this change however, on Windows a sudden flash to the default
JUCE background colour would occur, before the default white background
could take effect.
At the time of this commit there is a known issue with the
icorewebview2controller2, where a white flash is inevitable, unless the
WEBVIEW2_DEFAULT_BACKGROUND_COLOR environment variable is set. Using
a white background behind the WebView avoids this issue.
This assertion was intended to emulate a performance warning that could
be emitted by the D2D debug layer, but it often gets in the way during
development. To check for this performance issue, users can change
D2D1_DEBUG_LEVEL_NONE to D2D1_DEBUG_LEVEL_INFORMATION in
juce_DirectX_windows.h
Calling getInstance may recreate the list singleton if it has already
been destroyed. This should only happen if a Typeface instance is being
destroyed after the app/plugin has been shutdown, e.g. if the typeface
has static storage duration.
This fixes potential crashes when this static object is accessed from
the constructors of other objects with static storage duration.
A concrete example of this could be seen when running the following on
Linux:
static inline const Typeface::Ptr face =
Typeface::createSystemTypefaceFor (...);
Here, 'face' is a static data member of some class. Creating a system
typeface on Linux will parse an XML document of system typefaces,
eventually accessing juce_xmltextContentAttributeName.
This issue could be seen when calling setBufferedToImage on a component
with a transparent background with a size different to the component's
size.
The details are unclear to me, but it seems like both calling Clear on
the device context, and using the COPY blend mode, ignore alpha values
and instead use a constant alpha of 1.0 when there is a geometric
clipping layer active.
As a workaround for this issue, when clearing a rectangle we now pop all
active layers, fill their intersection using the COPY blend mode while
there are no layers active, and then reinstate the layers.
The new implementation is likely to be very slow, however I think this
code path is unlikely to be used frequently in practice. The main
use-case for rendering clear transparent areas is the rendering of
buffered component images, but such cases normally use axis-aligned
clipping regions, which should be able to use the faster path.
Frequently, excludeClipRectangle will be called several times in a row,
in order to trim away borders on each side of a rectangle. When this
happens, we want to avoid creating geometric clip layers which exclude
only two or three of the borders, and instead wait until all borders
have been excluded before applying the clip list. This way, it may be
possible to simplify the clip list to a single rectangle, which can be
implemented using the faster axis-aligned clipping layer.