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
This commit is contained in:
Vadim Zeitlin
2014-04-27 22:39:59 +00:00
parent 2e079a988d
commit ec112197f2

View File

@@ -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