Use stock wxBrush

Instead of using dynamically created brushes (implicitly from stock colours)
we should use corresponding stock brushes because once created they are
stored in the cache what can slightly improve performance.
This commit is contained in:
Artur Wieczorek
2020-08-08 21:58:14 +02:00
parent 3d469f3234
commit 9018d74e99

View File

@@ -544,11 +544,11 @@ bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& path)
{ {
wxMemoryDC dc(bmp); wxMemoryDC dc(bmp);
dc.SetBackground(*wxBLACK); dc.SetBackground(*wxBLACK_BRUSH);
dc.Clear(); dc.Clear();
wxScopedPtr<wxGraphicsContext> context(wxGraphicsContext::Create(dc)); wxScopedPtr<wxGraphicsContext> context(wxGraphicsContext::Create(dc));
context->SetBrush(*wxWHITE); context->SetBrush(*wxWHITE_BRUSH);
context->SetAntialiasMode(wxANTIALIAS_NONE); context->SetAntialiasMode(wxANTIALIAS_NONE);
context->FillPath(path); context->FillPath(path);
} }