Skip to content

Commit d0ced67

Browse files
committed
use ComPtr in presenters
1 parent 9733d05 commit d0ced67

File tree

5 files changed

+108
-155
lines changed

5 files changed

+108
-155
lines changed

src/Views.Win32/ViewHelpers.h

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -129,94 +129,6 @@ static RECT get_window_rect_client_space(HWND parent, HWND child)
129129
offset_client.top + (client.bottom - client.top)};
130130
}
131131

132-
struct CompositionContext
133-
{
134-
IDXGIFactory2 *dxgi_factory{};
135-
IDXGIAdapter1 *dxgi_adapter{};
136-
IDXGIDevice1 *dxgi_device{};
137-
IDXGISwapChain1 *dxgi_swapchain{};
138-
IDXGISurface1 *dxgi_surface{};
139-
140-
ID3D11Device *d3d11_device{};
141-
ID3D11DeviceContext *d3d_dc{};
142-
ID3D11Resource *d3d11_surface{};
143-
ID3D11Resource *d3d11_front_buffer{};
144-
ID3D11Texture2D *d3d11_gdi_tex{};
145-
146-
ID2D1Bitmap1 *d2d1_bitmap{};
147-
ID2D1Factory3 *d2d_factory{};
148-
ID2D1Device2 *d2d_device{};
149-
ID2D1DeviceContext2 *d2d_dc{};
150-
151-
IDCompositionVisual *comp_visual{};
152-
IDCompositionDevice *comp_device{};
153-
IDCompositionTarget *comp_target{};
154-
};
155-
156-
static std::optional<CompositionContext> create_composition_context(const HWND hwnd, const D2D1_SIZE_U size)
157-
{
158-
CompositionContext ctx;
159-
160-
CreateDXGIFactory2(0, IID_PPV_ARGS(&ctx.dxgi_factory));
161-
ctx.dxgi_factory->EnumAdapters1(0, &ctx.dxgi_adapter);
162-
163-
D3D11CreateDevice(ctx.dxgi_adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,
164-
D3D11_CREATE_DEVICE_BGRA_SUPPORT | D3D11_CREATE_DEVICE_SINGLETHREADED, nullptr, 0,
165-
D3D11_SDK_VERSION, &ctx.d3d11_device, nullptr, &ctx.d3d_dc);
166-
167-
ctx.d3d11_device->QueryInterface(&ctx.dxgi_device);
168-
ctx.dxgi_device->SetMaximumFrameLatency(1);
169-
170-
DCompositionCreateDevice(ctx.dxgi_device, IID_PPV_ARGS(&ctx.comp_device));
171-
ctx.comp_device->CreateTargetForHwnd(hwnd, true, &ctx.comp_target);
172-
ctx.comp_device->CreateVisual(&ctx.comp_visual);
173-
174-
DXGI_SWAP_CHAIN_DESC1 swapdesc{};
175-
swapdesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
176-
swapdesc.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED;
177-
swapdesc.SampleDesc.Count = 1;
178-
swapdesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
179-
swapdesc.BufferCount = 2;
180-
swapdesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
181-
swapdesc.Width = size.width;
182-
swapdesc.Height = size.height;
183-
184-
ctx.dxgi_factory->CreateSwapChainForComposition(ctx.d3d11_device, &swapdesc, nullptr, &ctx.dxgi_swapchain);
185-
ctx.comp_visual->SetContent(ctx.dxgi_swapchain);
186-
ctx.comp_target->SetRoot(ctx.comp_visual);
187-
188-
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, {}, &ctx.d2d_factory);
189-
ctx.d2d_factory->CreateDevice(ctx.dxgi_device, &ctx.d2d_device);
190-
ctx.d2d_device->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS, &ctx.d2d_dc);
191-
192-
D3D11_TEXTURE2D_DESC desc{};
193-
desc.Width = size.width;
194-
desc.Height = size.height;
195-
desc.MipLevels = 1;
196-
desc.ArraySize = 1;
197-
desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
198-
desc.SampleDesc = {.Count = 1, .Quality = 0};
199-
desc.Usage = D3D11_USAGE_DEFAULT;
200-
desc.BindFlags = D3D11_BIND_RENDER_TARGET;
201-
desc.MiscFlags = D3D11_RESOURCE_MISC_GDI_COMPATIBLE;
202-
203-
ctx.d3d11_device->CreateTexture2D(&desc, nullptr, &ctx.d3d11_gdi_tex);
204-
ctx.d3d11_gdi_tex->QueryInterface(&ctx.dxgi_surface);
205-
206-
const UINT dpi = GetDpiForWindow(hwnd);
207-
const D2D1_BITMAP_PROPERTIES1 props =
208-
D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW,
209-
D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), dpi, dpi);
210-
211-
ctx.d2d_dc->CreateBitmapFromDxgiSurface(ctx.dxgi_surface, props, &ctx.d2d1_bitmap);
212-
ctx.d2d_dc->SetTarget(ctx.d2d1_bitmap);
213-
214-
ctx.dxgi_swapchain->GetBuffer(1, IID_PPV_ARGS(&ctx.d3d11_front_buffer));
215-
ctx.dxgi_surface->QueryInterface(&ctx.d3d11_surface);
216-
217-
return ctx;
218-
}
219-
220132
static void set_statusbar_parts(HWND hwnd, std::vector<int32_t> parts)
221133
{
222134
auto new_parts = parts;
@@ -595,4 +507,4 @@ static LRESULT CALLBACK no_resize_subclass_proc(HWND hwnd, UINT msg, WPARAM wpar
595507
static void attach_no_resize_subproc(const HWND hwnd)
596508
{
597509
SetWindowSubclass(hwnd, no_resize_subclass_proc, 0, 0);
598-
}
510+
}

src/Views.Win32/lua/presenters/DCompPresenter.cpp

Lines changed: 80 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,6 @@
77
#include "stdafx.h"
88
#include "DCompPresenter.h"
99

10-
DCompPresenter::~DCompPresenter()
11-
{
12-
m_cmp.d3d11_gdi_tex->Release();
13-
m_cmp.d3d11_front_buffer->Release();
14-
m_cmp.d3d11_surface->Release();
15-
m_cmp.dxgi_surface->Release();
16-
m_cmp.d2d_dc->Release();
17-
m_cmp.d3d_dc->Release();
18-
m_cmp.comp_device->Release();
19-
m_cmp.comp_target->Release();
20-
m_cmp.dxgi_swapchain->Release();
21-
m_cmp.d2d_factory->Release();
22-
m_cmp.d2d_device->Release();
23-
m_cmp.comp_visual->Release();
24-
m_cmp.d2d1_bitmap->Release();
25-
m_cmp.dxgi_device->Release();
26-
m_cmp.d3d11_device->Release();
27-
m_cmp.dxgi_adapter->Release();
28-
m_cmp.dxgi_factory->Release();
29-
}
30-
3110
bool DCompPresenter::init(HWND hwnd)
3211
{
3312
m_hwnd = hwnd;
@@ -36,21 +15,70 @@ bool DCompPresenter::init(HWND hwnd)
3615
GetClientRect(hwnd, &rect);
3716
m_size = {(UINT32)rect.right - rect.left, (UINT32)rect.bottom - rect.top};
3817

39-
const auto cmp = create_composition_context(hwnd, m_size);
18+
CreateDXGIFactory2(0, IID_PPV_ARGS(dxgi_factory.GetAddressOf()));
19+
dxgi_factory->EnumAdapters1(0, dxgi_adapter.GetAddressOf());
20+
21+
D3D11CreateDevice(dxgi_adapter.Get(), D3D_DRIVER_TYPE_UNKNOWN, nullptr,
22+
D3D11_CREATE_DEVICE_BGRA_SUPPORT | D3D11_CREATE_DEVICE_SINGLETHREADED, nullptr, 0,
23+
D3D11_SDK_VERSION, &d3d11_device, nullptr, d3d_dc.GetAddressOf());
24+
25+
d3d11_device->QueryInterface(dxgi_device.GetAddressOf());
26+
dxgi_device->SetMaximumFrameLatency(1);
27+
28+
DCompositionCreateDevice(dxgi_device.Get(), IID_PPV_ARGS(comp_device.GetAddressOf()));
29+
comp_device->CreateTargetForHwnd(hwnd, true, comp_target.GetAddressOf());
30+
comp_device->CreateVisual(comp_visual.GetAddressOf());
31+
32+
DXGI_SWAP_CHAIN_DESC1 swapdesc{};
33+
swapdesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
34+
swapdesc.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED;
35+
swapdesc.SampleDesc.Count = 1;
36+
swapdesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
37+
swapdesc.BufferCount = 2;
38+
swapdesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
39+
swapdesc.Width = m_size.width;
40+
swapdesc.Height = m_size.height;
41+
42+
dxgi_factory->CreateSwapChainForComposition(d3d11_device.Get(), &swapdesc, nullptr, dxgi_swapchain.GetAddressOf());
43+
comp_visual->SetContent(dxgi_swapchain.Get());
44+
comp_target->SetRoot(comp_visual.Get());
45+
46+
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, {}, d2d_factory.GetAddressOf());
47+
d2d_factory->CreateDevice(dxgi_device.Get(), d2d_device.GetAddressOf());
48+
d2d_device->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS,
49+
d2d_dc.GetAddressOf());
50+
51+
D3D11_TEXTURE2D_DESC desc{};
52+
desc.Width = m_size.width;
53+
desc.Height = m_size.height;
54+
desc.MipLevels = 1;
55+
desc.ArraySize = 1;
56+
desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
57+
desc.SampleDesc = {.Count = 1, .Quality = 0};
58+
desc.Usage = D3D11_USAGE_DEFAULT;
59+
desc.BindFlags = D3D11_BIND_RENDER_TARGET;
60+
desc.MiscFlags = D3D11_RESOURCE_MISC_GDI_COMPATIBLE;
61+
62+
d3d11_device->CreateTexture2D(&desc, nullptr, d3d11_gdi_tex.GetAddressOf());
63+
d3d11_gdi_tex->QueryInterface(dxgi_surface.GetAddressOf());
64+
65+
const UINT dpi = GetDpiForWindow(hwnd);
66+
const D2D1_BITMAP_PROPERTIES1 props =
67+
D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW,
68+
D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), dpi, dpi);
4069

41-
if (!cmp.has_value())
42-
{
43-
return false;
44-
}
70+
d2d_dc->CreateBitmapFromDxgiSurface(dxgi_surface.Get(), props, d2d1_bitmap.GetAddressOf());
71+
d2d_dc->SetTarget(d2d1_bitmap.Get());
4572

46-
m_cmp = cmp.value();
73+
dxgi_swapchain->GetBuffer(1, IID_PPV_ARGS(d3d11_front_buffer.GetAddressOf()));
74+
dxgi_surface->QueryInterface(d3d11_surface.GetAddressOf());
4775

4876
return true;
4977
}
5078

5179
ID2D1RenderTarget *DCompPresenter::dc() const
5280
{
53-
return m_cmp.d2d_dc;
81+
return d2d_dc.Get();
5482
}
5583

5684
D2D1_SIZE_U DCompPresenter::size()
@@ -65,15 +93,15 @@ void DCompPresenter::resize(D2D1_SIZE_U size)
6593
m_size = size;
6694

6795
// 1. Release size-dependent resources that must be recreated after a swapchain resize
68-
m_cmp.d2d_dc->SetTarget(nullptr);
69-
m_cmp.d2d1_bitmap->Release();
70-
m_cmp.dxgi_surface->Release();
71-
m_cmp.d3d11_front_buffer->Release();
72-
m_cmp.d3d11_surface->Release();
73-
m_cmp.d3d11_gdi_tex->Release();
96+
d2d_dc->SetTarget(nullptr);
97+
d2d1_bitmap.Reset();
98+
dxgi_surface.Reset();
99+
d3d11_front_buffer.Reset();
100+
d3d11_surface.Reset();
101+
d3d11_gdi_tex.Reset();
74102

75103
// 2. Resize the swapchain buffers
76-
m_cmp.dxgi_swapchain->ResizeBuffers(2, size.width, size.height, DXGI_FORMAT_B8G8R8A8_UNORM, 0);
104+
dxgi_swapchain->ResizeBuffers(2, size.width, size.height, DXGI_FORMAT_B8G8R8A8_UNORM, 0);
77105

78106
// 3. Recreate the GDI-compatible texture at the new size
79107
D3D11_TEXTURE2D_DESC desc{};
@@ -87,47 +115,46 @@ void DCompPresenter::resize(D2D1_SIZE_U size)
87115
desc.BindFlags = D3D11_BIND_RENDER_TARGET;
88116
desc.MiscFlags = D3D11_RESOURCE_MISC_GDI_COMPATIBLE;
89117

90-
m_cmp.d3d11_device->CreateTexture2D(&desc, nullptr, &m_cmp.d3d11_gdi_tex);
91-
m_cmp.d3d11_gdi_tex->QueryInterface(&m_cmp.dxgi_surface);
118+
d3d11_device->CreateTexture2D(&desc, nullptr, d3d11_gdi_tex.GetAddressOf());
119+
d3d11_gdi_tex->QueryInterface(dxgi_surface.GetAddressOf());
92120

93121
// 4. Recreate the D2D bitmap target from the new DXGI surface
94122
const UINT dpi = GetDpiForWindow(m_hwnd);
95123
const D2D1_BITMAP_PROPERTIES1 props =
96124
D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW,
97125
D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), dpi, dpi);
98126

99-
m_cmp.d2d_dc->CreateBitmapFromDxgiSurface(m_cmp.dxgi_surface, props, &m_cmp.d2d1_bitmap);
100-
m_cmp.d2d_dc->SetTarget(m_cmp.d2d1_bitmap);
127+
d2d_dc->CreateBitmapFromDxgiSurface(dxgi_surface.Get(), props, d2d1_bitmap.GetAddressOf());
128+
d2d_dc->SetTarget(d2d1_bitmap.Get());
101129

102130
// 5. Re-acquire the front buffer and surface references from the resized swapchain
103-
m_cmp.dxgi_swapchain->GetBuffer(1, IID_PPV_ARGS(&m_cmp.d3d11_front_buffer));
104-
m_cmp.dxgi_surface->QueryInterface(&m_cmp.d3d11_surface);
131+
dxgi_swapchain->GetBuffer(1, IID_PPV_ARGS(d3d11_front_buffer.GetAddressOf()));
132+
dxgi_surface->QueryInterface(d3d11_surface.GetAddressOf());
105133
}
106134

107135
void DCompPresenter::present()
108136
{
109137
// 1. Copy Direct2D graphics to the GDI-compatible texture
110-
ID3D11Resource *d2d_render_target = nullptr;
111-
m_cmp.dxgi_surface->QueryInterface(&d2d_render_target);
112-
m_cmp.d3d_dc->CopyResource(m_cmp.d3d11_gdi_tex, d2d_render_target);
113-
d2d_render_target->Release();
138+
Microsoft::WRL::ComPtr<ID3D11Resource> d2d_render_target;
139+
dxgi_surface->QueryInterface(d2d_render_target.GetAddressOf());
140+
d3d_dc->CopyResource(d3d11_gdi_tex.Get(), d2d_render_target.Get());
114141

115142
// 2. Copy the GDI-compatible texture to the swapchain's back buffer
116-
ID3D11Resource *back_buffer = nullptr;
117-
m_cmp.dxgi_swapchain->GetBuffer(0, IID_PPV_ARGS(&back_buffer));
118-
m_cmp.d3d_dc->CopyResource(back_buffer, m_cmp.d3d11_gdi_tex);
119-
back_buffer->Release();
143+
Microsoft::WRL::ComPtr<ID3D11Resource> back_buffer;
144+
dxgi_swapchain->GetBuffer(0, IID_PPV_ARGS(back_buffer.GetAddressOf()));
145+
d3d_dc->CopyResource(back_buffer.Get(), d3d11_gdi_tex.Get());
120146

121-
m_cmp.dxgi_swapchain->Present(0, 0);
122-
m_cmp.comp_device->Commit();
147+
dxgi_swapchain->Present(0, 0);
148+
comp_device->Commit();
123149
}
124150

125151
void DCompPresenter::blit(HDC hdc, RECT rect)
126152
{
127153
// 1. Get our GDI-compatible D3D texture's DC
154+
Microsoft::WRL::ComPtr<IDXGISurface1> dxgi_surface;
155+
d3d11_gdi_tex->QueryInterface(dxgi_surface.GetAddressOf());
156+
128157
HDC dc;
129-
IDXGISurface1 *dxgi_surface;
130-
m_cmp.d3d11_gdi_tex->QueryInterface(&dxgi_surface);
131158
dxgi_surface->GetDC(false, &dc);
132159

133160
// 2. Blit our texture DC to the target DC, while preserving the alpha channel with AlphaBlend
@@ -136,5 +163,4 @@ void DCompPresenter::blit(HDC hdc, RECT rect)
136163

137164
// 3. Cleanup
138165
dxgi_surface->ReleaseDC(nullptr);
139-
dxgi_surface->Release();
140166
}

src/Views.Win32/lua/presenters/DCompPresenter.h

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class DCompPresenter : public Presenter
1212
{
1313
public:
14-
~DCompPresenter() override;
14+
~DCompPresenter() override = default;
1515
bool init(HWND hwnd) override;
1616
ID2D1RenderTarget *dc() const override;
1717
D2D1_SIZE_U size() override;
@@ -22,5 +22,24 @@ class DCompPresenter : public Presenter
2222
private:
2323
HWND m_hwnd{};
2424
D2D1_SIZE_U m_size{};
25-
CompositionContext m_cmp{};
25+
Microsoft::WRL::ComPtr<IDXGIFactory2> dxgi_factory;
26+
Microsoft::WRL::ComPtr<IDXGIAdapter1> dxgi_adapter;
27+
Microsoft::WRL::ComPtr<IDXGIDevice1> dxgi_device;
28+
Microsoft::WRL::ComPtr<IDXGISwapChain1> dxgi_swapchain;
29+
Microsoft::WRL::ComPtr<IDXGISurface1> dxgi_surface;
30+
31+
Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device;
32+
Microsoft::WRL::ComPtr<ID3D11DeviceContext> d3d_dc;
33+
Microsoft::WRL::ComPtr<ID3D11Resource> d3d11_surface;
34+
Microsoft::WRL::ComPtr<ID3D11Resource> d3d11_front_buffer;
35+
Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_gdi_tex;
36+
37+
Microsoft::WRL::ComPtr<ID2D1Bitmap1> d2d1_bitmap;
38+
Microsoft::WRL::ComPtr<ID2D1Factory3> d2d_factory;
39+
Microsoft::WRL::ComPtr<ID2D1Device2> d2d_device;
40+
Microsoft::WRL::ComPtr<ID2D1DeviceContext2> d2d_dc;
41+
42+
Microsoft::WRL::ComPtr<IDCompositionVisual> comp_visual;
43+
Microsoft::WRL::ComPtr<IDCompositionDevice> comp_device;
44+
Microsoft::WRL::ComPtr<IDCompositionTarget> comp_target;
2645
};

src/Views.Win32/lua/presenters/GDIPresenter.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ GDIPresenter::~GDIPresenter()
1212
SelectObject(m_gdi_back_dc, nullptr);
1313
DeleteObject(m_gdi_bmp);
1414
DeleteDC(m_gdi_back_dc);
15-
16-
m_d2d_factory->Release();
17-
m_d2d_render_target->Release();
1815
}
1916

2017
bool GDIPresenter::init(HWND hwnd)
@@ -36,8 +33,8 @@ bool GDIPresenter::init(HWND hwnd)
3633
D2D1_RENDER_TARGET_PROPERTIES props = D2D1::RenderTargetProperties(
3734
D2D1_RENDER_TARGET_TYPE_DEFAULT, D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED));
3835

39-
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &m_d2d_factory);
40-
m_d2d_factory->CreateDCRenderTarget(&props, &m_d2d_render_target);
36+
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, m_d2d_factory.GetAddressOf());
37+
m_d2d_factory->CreateDCRenderTarget(&props, m_d2d_render_target.GetAddressOf());
4138

4239
RECT dc_rect = {0, 0, (LONG)m_size.width, (LONG)m_size.height};
4340
m_d2d_render_target->BindDC(m_gdi_back_dc, &dc_rect);
@@ -47,7 +44,7 @@ bool GDIPresenter::init(HWND hwnd)
4744

4845
ID2D1RenderTarget *GDIPresenter::dc() const
4946
{
50-
return m_d2d_render_target;
47+
return m_d2d_render_target.Get();
5148
}
5249

5350
D2D1_SIZE_U GDIPresenter::size()
@@ -86,8 +83,7 @@ void GDIPresenter::present()
8683
bf.BlendOp = AC_SRC_OVER;
8784
bf.SourceConstantAlpha = 255;
8885
bf.AlphaFormat = 0;
89-
UpdateLayeredWindow(m_hwnd, nullptr, nullptr, &size, m_gdi_back_dc, &src_pt, m_mask_color, &bf,
90-
ULW_COLORKEY);
86+
UpdateLayeredWindow(m_hwnd, nullptr, nullptr, &size, m_gdi_back_dc, &src_pt, m_mask_color, &bf, ULW_COLORKEY);
9187
}
9288

9389
void GDIPresenter::blit(HDC hdc, RECT rect)

src/Views.Win32/lua/presenters/GDIPresenter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class GDIPresenter : public Presenter
2828
private:
2929
D2D1_SIZE_U m_size{};
3030
HWND m_hwnd = nullptr;
31-
ID2D1Factory *m_d2d_factory = nullptr;
32-
ID2D1DCRenderTarget *m_d2d_render_target = nullptr;
3331
HDC m_gdi_back_dc = nullptr;
3432
HBITMAP m_gdi_bmp = nullptr;
3533
COLORREF m_mask_color{};
34+
Microsoft::WRL::ComPtr<ID2D1Factory> m_d2d_factory;
35+
Microsoft::WRL::ComPtr<ID2D1DCRenderTarget> m_d2d_render_target;
3636
};

0 commit comments

Comments
 (0)