From 8a1bf07f147721abce428b844ebf6fa0140feea1 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 13 Aug 2024 12:02:46 +0100 Subject: [PATCH] Direct2D: Adjust return type of getPaintAreas in Direct2DHwndContext --- .../native/juce_Direct2DHwndContext_windows.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp b/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp index 18f9b37e73..59cfb2f924 100644 --- a/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp +++ b/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp @@ -70,7 +70,7 @@ public: paintAreas = std::move (areas); } - auto getPaintAreas() const + const RectangleList& getPaintAreas() const { return paintAreas; } @@ -346,11 +346,8 @@ private: return hr; } - if (! swapChainThread) - { - if (swap.swapChainEvent.has_value()) - swapChainThread = std::make_unique (*this, directX->getD2DMultithread()); - } + if (! swapChainThread && swap.swapChainEvent.has_value()) + swapChainThread = std::make_unique (*this, directX->getD2DMultithread()); if (! compositionTree.has_value()) compositionTree = CompositionTree::create (adapter->dxgiDevice, hwnd, swap.chain);