Even if the output stream is the only one receiving callbacks, it's
possible that the input device got disconnected, in which case we'll
still need to recreate both streams.
The code contains a performance optimisation for cases where the world
transform is translation only. In this case instead of applying the
brush transformation first and then the world translation, the order is
reversed. The translation is applied first and then the brush
transformation.
Flipping the transformations however is only correct in the special case
when both transformations are translation only.
This change is practically a no-op, because if the affected branch is
taken, then the world transform was not applied, so transform is a
unity matrix. But if transform was non-unity, then the wrong ordering
would cause an observable error.
Logically the brush transformation is nested inside the world
transformation so the right order is applying the brush transform first
followed by the world transform.
A change introduced in 00836d1e94 meant
that GL renderers could sometimes assert in
StateHelpers::ActiveTextures::bindTexture() when ending a transparency
layer.
Specifically, the issue was provoked by adding the ScopedTextureBinding
in the constructor of OpenGLFrameBuffer. This reset the bound texture
after creating a new transparency layer.
I think the previous implementation worked by accident, not by design.
It so happens that when rendering multiple transparency layers within
the same frame (i.e. calling begin/end several times in that order,
*not* nesting the calls), the same texture ID will generally get reused.
From the graphics context's (GC's) perspective, we create a texture with
ID "2", then call bindTexture() to bind it, and the GC remembers that
this ID is bound. We draw the frame, and the texture gets destroyed. The
call to glDeleteTextures() will cause the default texture, "0", to be
bound if the texture being destroyed is bound at the point of
destruction. So, after the texture is destroyed, the GC's stored binding
no longer reflects reality, since texture "0" is now bound.
The next time we create a texture, that texture also gets created with
ID "2". Previously, we would leave this texture bound after
construction, but now we re-bind the previously-bound texture, "0". This
causes the assertion in bindTexture() to fire when we next attempt to
bind texture "2", since the actual bound texture is "0".
The solution added in this patch will bind texture "0" when the
transparency layer image is destroyed, in order to keep the GC's view of
the GL context consistent with the real state.
The previous implementation could emit 'wildcard' channel layouts in too
many scenarios.
A wildcard channel count is -1 or -2, and indicates that any number of
channels is supported on the bus.
If the input and output layouts must match, then a layout of [-1, -1]
should be returned.
If any layout is valid in both directions, then a layout of [-1, -2]
should be returned.
In the case where we have a bus A and opposite bus B, we will now only
emit a wildcard count for bus A if every bus standard bus layout up to a
channel count of 16 can be applied successfully without changing the bus
count of B.
Previously, MIDI FX plugins would only load on mono tracks.
Now, we add a separate plugin description for each potential track
layout. This is the same approach used by the example MIDI FX from the
AAX SDK.
Prior to this fix calling setDirectory and then setSelectedFile from the
same call stack could cause setSelectedFile to have no effect. This was
because the directory change is asynchronously propagated from the
DirectoryContentsList. This was picked up by the FileListComponent as a
directory change after setSelectedFile, even though the directory change
happened before.
Before 2c5b1fbb6f, we only queried
currentlyFocusedPeer during runAsync(), instead of reading it
immediately. The behaviour after that commit prevented message boxes
from showing if showMessageBoxAsync() was called before any peer had
been created.
With the PopupMenu creating its own window the focus would return to the
ComboBox after activating a menu item. Prior to this commit however the
focus was seemingly lost after menu item activation. With this change
the focus returns to the ComboBox in both cases.