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:
@@ -544,11 +544,11 @@ bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& path)
|
||||
|
||||
{
|
||||
wxMemoryDC dc(bmp);
|
||||
dc.SetBackground(*wxBLACK);
|
||||
dc.SetBackground(*wxBLACK_BRUSH);
|
||||
dc.Clear();
|
||||
|
||||
wxScopedPtr<wxGraphicsContext> context(wxGraphicsContext::Create(dc));
|
||||
context->SetBrush(*wxWHITE);
|
||||
context->SetBrush(*wxWHITE_BRUSH);
|
||||
context->SetAntialiasMode(wxANTIALIAS_NONE);
|
||||
context->FillPath(path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user