Initial Commit of full native bitmap macOS implementation

Right now, to better test regressions, with dual implementation
This commit is contained in:
Stefan Csomor
2018-09-07 21:44:19 +02:00
committed by Vadim Zeitlin
parent a5aa044a7b
commit e7d21f6638
10 changed files with 532 additions and 302 deletions

View File

@@ -56,7 +56,7 @@ wxMemoryDCImpl::~wxMemoryDCImpl()
{
if ( m_selected.IsOk() )
{
m_selected.EndRawAccess() ;
m_selected.SetSelectedInto(NULL);
wxDELETE(m_graphicContext);
}
}
@@ -65,14 +65,18 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
{
if ( m_selected.IsOk() )
{
m_selected.EndRawAccess() ;
m_selected.SetSelectedInto(NULL);
wxDELETE(m_graphicContext);
}
m_selected = bitmap;
if (m_selected.IsOk())
{
m_selected.BeginRawAccess() ;
wxASSERT_MSG( !bitmap.GetSelectedInto() ||
(bitmap.GetSelectedInto() == GetOwner()),
wxT("Bitmap is selected in another wxMemoryDC, delete the first wxMemoryDC or use SelectObject(NULL)") );
m_selected.SetSelectedInto(GetOwner());
m_width = bitmap.GetScaledWidth();
m_height = bitmap.GetScaledHeight();
m_contentScaleFactor = bitmap.GetScaleFactor();