Previously, maximising a frameless window on a secondary display could
result in the window's coordinates being computed incorrectly, leading
to graphical glitches.
Reverts b12088a1f6
After some investigation, it appears that ClearType rendering is
unsuitable when
- the render target has translucent pixels underneath rendered text, or
- the render ouput is rotated, scaled, subpixel-translated, or otherwise
transformed before display.
This necessitates avoiding ClearType when rendering into transparent
bitmaps.
Unfortunately, a commmon use-case for transparent bitmaps is buffered
component images. Even if ClearType were enabled for opaque targets,
ClearType text could then end up displaying next to non-ClearType text
rendered to an intermediate texture, leading to an inconsistent
appearance.
There's also not a straightforward way of exposing a ClearType rendering
option in all of the places that it would be required, and a change of
this size is difficult to justify given that subpixel text rendering
controls would only have an effect on Windows.
This fixes an issue introduced in
340f531c71 where embedded OpenGL windows
would incorrectly have the WS_EX_LAYERED style bit set, which in turn
prevented them from displaying correctly.
Before the window-transparency refactoring, OpenGL windows would not
have the layered bit set because only peers with windowIsSemiTransparent
were created with the layered bit, and the layered bit was only updated
if the peer alpha was changed.
The new behaviour is to always set WS_EX_LAYERED if the peer's component
is non-opaque with no titlebar, or if the component has an alpha < 1.0f.
The OpenGLContext's placeholder component has no titlebar, so it must be
opaque in order to avoid setting the layered style bit.
Reaper uses an undocumented version 0 of the fxbank struct, this could
be handled by JUCE but instead this solution switches to using methods
provided by the VST3 SDK to save and load VST2 states. This also has
the added benefit of no longer requiring the VST2 SDK to build a VST3
plugin that supports saving and loading VST2 states.
Previously, this function didn't store/copy the provided bitmap, so the
resulting image was blank. This also broke createSnapshot(), which would
always return a blank image.
The docs for WS_MINIMIZEBOX and WS_MAXIMIZEBOX specify that WS_SYSMENU must be specified.
The docs for WS_SYSMENU specify that WS_CAPTION must be specified.
This change also moves the startFrame and endFrame calls out of the
plain Direct2DImageContext and into a special-purpose "flushing" context
that is private to Direct2DPixelData.