mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Direct2D: Track UpdateRegions in D2DContext rather than the Direct2DHwndContext
This commit is contained in:
parent
c94b8e1712
commit
570fd4b65c
3 changed files with 5 additions and 20 deletions
|
|
@ -313,7 +313,6 @@ private:
|
|||
std::unique_ptr<SwapChainThread> swapChainThread;
|
||||
BackBufferLock presentation;
|
||||
std::optional<CompositionTree> compositionTree;
|
||||
UpdateRegion updateRegion;
|
||||
RectangleList<int> deferredRepaints;
|
||||
Rectangle<int> frameSize;
|
||||
std::vector<RECT> dirtyRectangles;
|
||||
|
|
@ -493,18 +492,6 @@ public:
|
|||
JUCE_TRACE_EVENT_INT_RECT (etw::repaint, etw::paintKeyword, snappedRectangle);
|
||||
}
|
||||
|
||||
void addInvalidWindowRegionToDeferredRepaints()
|
||||
{
|
||||
updateRegion.findRECTAndValidate (hwnd);
|
||||
|
||||
// Call addDeferredRepaint for each RECT in the update region to make
|
||||
// sure they are snapped properly for DPI scaling
|
||||
for (const auto& rect : updateRegion.getRects())
|
||||
addDeferredRepaint (D2DUtilities::toRectangle (rect));
|
||||
|
||||
updateRegion.clear();
|
||||
}
|
||||
|
||||
SavedState* startFrame (float dpiScale) override
|
||||
{
|
||||
if (resizing)
|
||||
|
|
@ -721,11 +708,6 @@ void Direct2DHwndContext::addDeferredRepaint (Rectangle<int> deferredRepaint)
|
|||
pimpl->addDeferredRepaint (deferredRepaint);
|
||||
}
|
||||
|
||||
void Direct2DHwndContext::addInvalidWindowRegionToDeferredRepaints()
|
||||
{
|
||||
pimpl->addInvalidWindowRegionToDeferredRepaints();
|
||||
}
|
||||
|
||||
Image Direct2DHwndContext::createSnapshot() const
|
||||
{
|
||||
return pimpl->createSnapshot();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ public:
|
|||
void updateSize();
|
||||
|
||||
void addDeferredRepaint (Rectangle<int> deferredRepaint);
|
||||
void addInvalidWindowRegionToDeferredRepaints();
|
||||
|
||||
Image createSnapshot() const override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue