reuk
3768349a05
Font: Make Font and TypefaceCache threadsafe
Previously, it wasn't safe to access Font instances from multiple
threads because there was a chance that they might reference the same
shared internal state. In this case, calling getTypeface() or getAscent from
two threads simultaneously would cause a race on the typeface and ascent
data members, even though the Font instances appeared to be disjoint.
With this change in place, it is now safe to use Font instances from
multiple threads simultaneously.
It is still an error to modify the same Font instance from multiple
threads without synchronization!
// Fine:
Font a;
Font b = a;
auto futureA = std::async (std::launch::async, [&a] { /* do something with a */ });
auto futureB = std::async (std::launch::async, [&b] { /* do something with b */ });
// Bad idea:
Font f;
auto futureA = std::async (std::launch::async, [&f] { /* do something with f */ });
auto futureB = std::async (std::launch::async, [&f] { /* do something with f */ });
3 years ago
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
4 years ago
ed
009d685179
Updated all license headers
4 years ago
Tom Poole
894e7d2bd2
Updated all license headers
5 years ago
Tom Poole
2d16374b14
Updated all license headers
5 years ago
reuk
5f348c3040
Warnings: Add warning-wrangling header
5 years ago
reuk
327f817b9b
Copyrights: Update commercial/gpl headers to be gpl-only
5 years ago
ed
26c9468dc5
Deprecated AffineTransform::getScaleFactor() as it was producing incorrect values for transforms containing rotations. Added getDeterminant() method for getting the determinant of the transform
5 years ago
ed
59a058fdc6
Fixed some warnings flagged up when enabling -Wswitch-enum, -Wswitch-default, -Wredundant-decls, and -Wimplicit-fallthrough
5 years ago
jules
f58eacc135
Added more unique_ptr use, for functions that create LowLevelGraphicsContext or ImageType objects.
6 years ago
Tom Poole
4e0adb2af8
GCC 9 compatibility fixes
6 years ago
ed
a234721110
Added various clang-tidy modernize-* fixes
6 years ago
jules
6fda0bffca
Fixed some stray zeros that were still being passed as null pointers
6 years ago
Tom Poole
0e1722e387
Multiple spelling fixes
6 years ago
Tom Poole
08d67c763f
Made some JUCE classes TriviallyCopyable
6 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
6 years ago
Tom Poole
102ed4a9f2
Fixed some compiler warnings
6 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
6 years ago
jules
974b4a8351
Removed some legacy friend class declarations that are no longer needed with modern compilers
7 years ago
jules
38295f332b
Converted some old typedefs to using declarations
7 years ago
Tom Poole
ab863a6dc2
Replaced all usage of ScopedPointer with std::unique_ptr
7 years ago
ed
cdbc28c18b
Add documentation tags
7 years ago
jules
e1f57f64da
Optimised a couple of places in the software/GL render engines where copies of RectangleLists could be avoided
7 years ago
jules
1a60fa9765
More ScopedPointer/unique_ptr compatibility work
7 years ago
jules
48a5fbd333
Another batch of ScopedPointer cleanups
7 years ago
jules
78b0ab6442
A few code cleanups
7 years ago
jules
3ec5c17bb1
Misc cleanups relating to ScopedPointer
7 years ago
jules
3e73e11d82
Avoided a visual studio warning
7 years ago
jules
9d56e2990d
Optimised the GL renderer to avoid splitting large rectangles into horizontal strips unnecessarily
7 years ago
jules
2dc9316420
Misc ScopedPointer changes to start using reset() and get() rather than assignments and casts (part of an ongoing drift towards more std::unique_ptr compatibility)
7 years ago
jules
eda613c6db
Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools
7 years ago
jules
7c6f3d40b6
Tidied up some method calls involving HeapBlock
7 years ago
jules
3df7f8ff8b
Did a bit of minor modernising in Graphics + Path
7 years ago
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
8 years ago
jules
bf94ab0e4c
Made a few minor tweaks to reduce the number of pedantic -Wfloat-equals warnings
8 years ago
jules
38d49a5ee7
Modernised a few RectangleList iterators
8 years ago
hogliux
2da1bc5f41
Replace include guards with "#pragma once"
8 years ago
ed
aff5ea5a9b
Replaced two instances of src[1] with src[0] in the render4PixelAverage method as adding pixelStride handles the offset
8 years ago
jules
edec7b34b2
Replaced some uses of AffineTransform::identity with a default-constructed object
9 years ago
jules
6f092d602d
Rendering optimisation when filling off-screen paths
9 years ago
hogliux
c7b8e77031
Update copyright notice
9 years ago
jules
f6395d4cda
Raised the warnings level in the introjucer, and fixed a few warnings that were thrown up by this.
10 years ago
jules
c304ea1e15
Made a couple of internal glyph handling methods public to help 3rd party tweaking.
10 years ago
jules
7d8b9ad597
Avoided a few linux gcc warnings.
10 years ago
jules
d7777c87c5
Avoiding a VC warning.
11 years ago
jules
bcce4e388a
Minor optimisation in software image rendering.
11 years ago
jules
f4c83a9411
Fix for a very obscure race-condition involving font string initialisation.
11 years ago
jules
6c17d3ca74
GlyphCache multithreading fix.
11 years ago
jules
2dbd55db3e
Fix for threading bug in GlyphCache.
11 years ago
jules
2f91b1c5f4
Bit of tidying up in GlyphCache.
11 years ago