1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Direct2D: Reinstate multithreading support for D2D factory

Partially reverts a change made in
362a1cc070.

The factory needs to be multithreading-enabled in order to support e.g.
drawing to the screen on the main thread and drawing to an Image on a
background thread, even when no resources other than the graphics device
are shared between the two threads.
This commit is contained in:
reuk 2024-10-10 16:11:22 +01:00
parent 1e902bcdee
commit 97cd4fc162
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -269,7 +269,7 @@ private:
options.debugLevel = D2D1_DEBUG_LEVEL_NONE; options.debugLevel = D2D1_DEBUG_LEVEL_NONE;
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token") JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
ComSmartPtr<ID2D1Factory2> result; ComSmartPtr<ID2D1Factory2> result;
auto hr = D2D1CreateFactory (D2D1_FACTORY_TYPE_SINGLE_THREADED, auto hr = D2D1CreateFactory (D2D1_FACTORY_TYPE_MULTI_THREADED,
__uuidof (ID2D1Factory2), __uuidof (ID2D1Factory2),
&options, &options,
(void**) result.resetAndGetPointerAddress()); (void**) result.resetAndGetPointerAddress());