No real changes, just a micro optimization in wxOSX DoGetAsBitmap().

Don't call wxWindow::GetSize() unnecessarily when we use the given fixed
rectangle anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-07-27 00:36:25 +00:00
parent c3c0ae03fe
commit 960eedb920

View File

@ -594,12 +594,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
if (!m_window)
return wxNullBitmap;
wxSize sz = m_window->GetSize();
int width = subrect != NULL ? subrect->width : sz.x;
int height = subrect != NULL ? subrect->height : sz.y ;
wxBitmap bitmap(width, height);
wxBitmap bitmap(subrect ? subrect->GetSize() : m_window->GetSize());
NSView* view = (NSView*) m_window->GetHandle();
if ( [view isHiddenOrHasHiddenAncestor] == NO )