mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windows: Remove clearWindowRedirectionBitmap()
This commit is contained in:
parent
1b69ba3997
commit
025a05d210
2 changed files with 0 additions and 52 deletions
|
|
@ -490,8 +490,6 @@ public:
|
|||
if (swapChainThread)
|
||||
swapChainThread->notify();
|
||||
}
|
||||
|
||||
clearWindowRedirectionBitmap();
|
||||
}
|
||||
|
||||
void addDeferredRepaint (Rectangle<int> deferredRepaint)
|
||||
|
|
@ -515,32 +513,6 @@ public:
|
|||
updateRegion.clear();
|
||||
}
|
||||
|
||||
void clearWindowRedirectionBitmap()
|
||||
{
|
||||
if (opaque || swap.state != SwapChain::State::bufferAllocated)
|
||||
return;
|
||||
|
||||
deviceResources.deviceContext.createHwndRenderTarget (hwnd);
|
||||
|
||||
// Clear the GDI redirection bitmap using a Direct2D 1.0 render target
|
||||
const auto& hwndRenderTarget = deviceResources.deviceContext.hwndRenderTarget;
|
||||
|
||||
if (hwndRenderTarget == nullptr)
|
||||
return;
|
||||
|
||||
const auto colorF = D2DUtilities::toCOLOR_F (getBackgroundTransparencyKeyColour());
|
||||
|
||||
RECT clientRect;
|
||||
GetClientRect (hwnd, &clientRect);
|
||||
|
||||
const D2D1_SIZE_U size { (uint32) (clientRect.right - clientRect.left),
|
||||
(uint32) (clientRect.bottom - clientRect.top) };
|
||||
hwndRenderTarget->Resize (size);
|
||||
hwndRenderTarget->BeginDraw();
|
||||
hwndRenderTarget->Clear (colorF);
|
||||
hwndRenderTarget->EndDraw();
|
||||
}
|
||||
|
||||
SavedState* startFrame (float dpiScale) override
|
||||
{
|
||||
if (resizing)
|
||||
|
|
|
|||
|
|
@ -37,28 +37,6 @@ namespace juce
|
|||
|
||||
struct Direct2DDeviceContext
|
||||
{
|
||||
HRESULT createHwndRenderTarget (HWND hwnd)
|
||||
{
|
||||
if (hwndRenderTarget != nullptr)
|
||||
return S_OK;
|
||||
|
||||
SharedResourcePointer<DirectX> directX;
|
||||
|
||||
D2D1_SIZE_U size { 1, 1 };
|
||||
|
||||
D2D1_RENDER_TARGET_PROPERTIES renderTargetProps{};
|
||||
renderTargetProps.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
|
||||
renderTargetProps.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
|
||||
D2D1_HWND_RENDER_TARGET_PROPERTIES hwndRenderTargetProps{};
|
||||
hwndRenderTargetProps.hwnd = hwnd;
|
||||
hwndRenderTargetProps.pixelSize = size;
|
||||
hwndRenderTargetProps.presentOptions = D2D1_PRESENT_OPTIONS_IMMEDIATELY | D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS;
|
||||
return directX->getD2DFactory()->CreateHwndRenderTarget (&renderTargetProps,
|
||||
&hwndRenderTargetProps,
|
||||
hwndRenderTarget.resetAndGetPointerAddress());
|
||||
}
|
||||
|
||||
void resetTransform()
|
||||
{
|
||||
context->SetTransform (D2D1::IdentityMatrix());
|
||||
|
|
@ -71,7 +49,6 @@ struct Direct2DDeviceContext
|
|||
|
||||
void release()
|
||||
{
|
||||
hwndRenderTarget = nullptr;
|
||||
context = nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +72,6 @@ struct Direct2DDeviceContext
|
|||
}
|
||||
|
||||
ComSmartPtr<ID2D1DeviceContext1> context;
|
||||
ComSmartPtr<ID2D1HwndRenderTarget> hwndRenderTarget;
|
||||
};
|
||||
|
||||
class Direct2DBitmap final
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue