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

Direct2D: Fix data race when creating Direct2DPixelData instances on a background thread

This commit is contained in:
reuk 2024-06-20 12:27:54 +01:00
parent 0789048777
commit fe1a11908e

View file

@ -241,7 +241,10 @@ private:
}
ComSmartPtr<ID2D1Factory2> d2dFactory;
ListenerList<DxgiAdapterListener> listeners;
// It's possible that we'll need to add/remove listeners from background threads, especially in
// the case that Images are created on a background thread.
ThreadSafeListenerList<DxgiAdapterListener> listeners;
ComSmartPtr<IDXGIFactory2> factory = makeDxgiFactory();
ReferenceCountedArray<DxgiAdapter> adapterArray;
};