From ec112197f2bd4b993dce4848324d13d478212ec8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 Apr 2014 22:39:59 +0000 Subject: [PATCH] Micro optimization of checking for alpha transparency. Use faster accessors to the image size. Closes #16148. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 027a82e866..85badf5814 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -2755,11 +2755,11 @@ static bool AlphaBlt(wxMSWDCImpl* dcDst, if ( data ) { wxAlphaPixelData::Iterator p(data); - for ( int y = 0; y < bmpOld.GetHeight(); y++ ) + for ( int y = 0; y < data.GetHeight(); y++ ) { wxAlphaPixelData::Iterator rowStart = p; - for ( int x = 0; x < bmpOld.GetWidth(); x++ ) + for ( int x = 0; x < data.GetWidth(); x++ ) { // We choose to use wxALPHA_TRANSPARENT instead // of perhaps more logical wxALPHA_OPAQUE here