int alphaConstant = this->_GetAlphaAttenuation(bitmap);
- if (alphaConstant >= 255 && !bitmap.__hasMaskingColor)
+ if (!this->__useStableRenderer && bitmap.GetBitsPerPixel() == 32)
{
bool pass = false;
const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo();
const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo();
- if (!this->__useStableRenderer)
{
_Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch);
_ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver);
_Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch);
_Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
- pass = _Pixman::RotatePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y, degreeD, pivotD.x, pivotD.y);
+ if (alphaConstant < 255)
+ {
+ std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant));
+
+ if (modifiedSrcImage != null)
+ {
+ pass = _Pixman::RotatePixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y, degreeD, pivotD.x, pivotD.y);
+ }
+ }
+
+ if (!pass)
+ {
+ pass = _Pixman::RotatePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y, degreeD, pivotD.x, pivotD.y);
+ }
+
}
if (pass)