reuk
48c6087faf
Thread: Update macOS thread priority calculation
The Apple threading documentation [^1] says the following:
> The second argument to pthread_setschedparam is the desired policy,
which can currently be one of SCHED_FIFO (first in, first out),
SCHED_RR (round-robin), or SCHED_OTHER. The SCHED_OTHER policy is
generally used for extra policies that are specific to a given
operating system, and should thus be avoided when writing portable
code.
This appears to differ from the policy semantics on Linux and BSD, where
FIFO and RR are both explicitly real-time policies.
Therefore, on Linux/BSD we only enable the RR policy if the requested
priority is 8 or higher. Meanwhile, on macOS, we map all thread
priorities (0 - 10) onto the RR policy with an appropriate priority.
[^1]: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/scheduler/scheduler.html
3 years ago
reuk
c5c9f080d3
OpenGL: Ensure context is initially drawn with correct scale on macOS
3 years ago
reuk
ea8b0a2d32
OpenGL: Ensure that GL views display at the correct scale on macOS 12
Previously, we were using the window's top-left position to determine
the scale to use for the OpenGLContext. However, on macOS the
backingScaleFactor of the window is not strictly related to the top-left
corner of the window, so the OpenGL view's scale could end up differing
from the backing scale factor when slowly moving a window between
displays with different backing scale factors.
On macOS, we now use the backing scale factor of the window's screen (as
maintained by AppKit), rather than trying to work out the correct
display and scale ourselves.
3 years ago
reuk
e97f7d1c6c
OpenGLContext: Use high-priority thread for OpenGL renderer to smooth animations on M1 machines
3 years ago
reuk
6d3504adfa
OpenGLContext: Fix thread/consistency warnings on macOS
Previously, Xcode's main thread checker would complain when selecting
the "OpenGL Renderer" in the DemoRunner on macOS.
3 years ago
reuk
f0d11f961b
OpenGLContext: Avoid reading from component on background thread
3 years ago
attila
cea889d311
macOS OpenGL: Use display refresh rate when rate limiting swapBuffers()
3 years ago
attila
5c933d4c4e
macOS OpenGL: Use display refresh rate when rate limiting swapBuffers()
3 years ago
ed
f0002845d5
OpenGL: Correctly reset repaintEvent
3 years ago
reuk
90ad1877af
OpenGL: Only use vertex arrays if the GL version is greater or equal to 3
3 years ago
reuk
d64c4277b4
OpenGL: Reinstate ifdef which was removed accidentally
3 years ago
reuk
280d97eb79
OpenGL: Check at runtime whether non-power-of-two textures are supported
3 years ago
ed
dc61bd63e7
macOS: Manually reset repaint WaitableEvent when using CVDisplayLink
4 years ago
reuk
54423f6583
OpenGL: Add GLEW-inspired dynamic function loading
4 years ago
ed
b7e28541ca
Replaced deprecated Displays methods
4 years ago
ed
009d685179
Updated all license headers
5 years ago
ed
05602341fc
OpenGL: Take global scale factor into account when setting rendering scale on Windows
5 years ago
ed
1bb38fe54a
OpenGL: Take global scale factor into account when setting rendering scale on Windows
5 years ago
ed
e1c18e6461
macOS: Render OpenGL frames on ThreadPoolJob instead of directly on the CVDisplayLink thread to avoid a deadlock
5 years ago
ed
228fc0a8cf
macOS: Disable CVDisplayLink driver when continuous repainting is false
5 years ago
ed
281ae0b067
macOS: Render OpenGL frames on ThreadPoolJob instead of directly on the CVDisplayLink thread to avoid a deadlock
5 years ago
ed
270237be9b
macOS: Disable CVDisplayLink driver when continuous repainting is false
5 years ago
Tom Poole
894e7d2bd2
Updated all license headers
5 years ago
Tom Poole
2d16374b14
Updated all license headers
5 years ago
reuk
327f817b9b
Copyrights: Update commercial/gpl headers to be gpl-only
5 years ago
ed
d77dae186d
Windows: Fixed an OpenGL scale issue in high-DPI plug-ins
5 years ago
ed
99a17ad3a9
Windows: Fixed an issue with OpenGL rendering scale in plug-ins
5 years ago
ed
18523101be
Windows: Refactored DPI handling in the VST wrapper and hosting code
5 years ago
ed
b2d8f45e14
Fixed a potential data race in OpenGLContext::CachedImage
5 years ago
Tom Poole
26027ca9c3
macOS: Use CVDisplayLink to drive OpenGL
5 years ago
ed
558ca3e5e6
OpenGL: Update native context window position when viewport size or scale changes in OpenGLContext::CachedImage::updateViewportSize()
5 years ago
ed
6dda52b98b
OpenGL: Check frame buffer completeness in OpenGLContext::copyTexture() to avoid an GL_INVALID_FRAMEBUFFER_OPERATION error
5 years ago
Tom Poole
670f77f80c
Fixed some Android compiler warnings
6 years ago
Tom Poole
16dd26649a
Fixed some GCC compiler warnings and removed deprecated functions
6 years ago
Tom Poole
d475b17a81
Fixed some compiler warnings
6 years ago
Tom Poole
cbdf5e6d21
Fixed some compiler warnings
6 years ago
ed
853ec552f1
OpenGL: Use width and height when calculating transform
6 years ago
ed
eaf0f990d4
Replaced all uses of static_cast<Type&&> with std::move
6 years ago
hogliux
008b7a9ab2
Re-structured the low-level Android native code
Please see the forum post "Re-structuring of JUCE’s low-level Android code" and the BREAKING-CHANGES.txt for more information.
6 years ago
ed
97c100b9c1
Windows: Added a workaround for non-DPI aware windows having an incorrect scale factor when using the OpenGL renderer
6 years ago
jules
359132ed55
More zero -> nullptr fixes
6 years ago
ed
b78e63aa02
Moved Displays class out of Desktop and into its own .h/.cpp and deprecated Displays::getDisplayContaining()
6 years ago
jules
95a3f0b039
Whitespace
7 years ago
jules
1e6bbb8da9
Added some methods to allow ReferenceCountedObjectPtrs to be constructed or copied from references as well as pointers - as well as increasing safety, this actually makes things a bit more efficient as it skips a nullptr check. Updated lots of places in the code that could take advantage of this
7 years ago
jules
49aa9c9db4
Added flag JUCE_STRICT_REFCOUNTEDPOINTER which is recommended to avoid accidental leaks when using ref-counted pointers. Enabled this flag in the demo projects, and used it to help tidy up some dubious smart-pointer use
7 years ago
hogliux
e91def7fae
OpenGL: Fixed an issue where components using OpenGL would not be restarted correctly when used in the FX docker window in Reaper
7 years ago
Tom Poole
ab863a6dc2
Replaced all usage of ScopedPointer with std::unique_ptr
7 years ago
ed
c715b069b5
OpenGL: Revert commits 515f484
and 0a15be7
and calculate scale factor using relative bounds instead
7 years ago
ed
0a15be729e
OpenGL: Apply Component's transform when invalidating
7 years ago
jules
1a60fa9765
More ScopedPointer/unique_ptr compatibility work
7 years ago