const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo();
{
- if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && GetCompositeMode() != COMPOSITE_MODE_SRC_OVER)
+ if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || bitmap.__isPremultiplied))
{
_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);
- if (srcBufferInfo.pixelFormat == PIXEL_FORMAT_RGB565 && srcImage.enableColorKey == 0 && dstBufferInfo.pixelFormat == PIXEL_FORMAT_ARGB8888 && !this->__isClipBoundsSet)
+ if (srcBufferInfo.pixelFormat == PIXEL_FORMAT_RGB565 && srcImage.enableColorKey == 0 && dstBufferInfo.pixelFormat == PIXEL_FORMAT_ARGB8888 && !this->__isClipBoundsSet && alphaConstant >= 255)
{
pixman_image_t* pPixmanSrc = pixman_image_create_bits(PIXMAN_r5g6b5, srcBufferInfo.width, srcBufferInfo.height, (uint32_t*)srcBufferInfo.pPixels, srcBufferInfo.pitch);
pixman_image_t* pPixmanDst = pixman_image_create_bits(PIXMAN_a8r8g8b8, dstBufferInfo.width, dstBufferInfo.height, (uint32_t*)dstBufferInfo.pPixels, dstBufferInfo.pitch);
}
}
{
- bool isPixmanSupported = (!this->__useStableRenderer && GetCompositeMode() != COMPOSITE_MODE_SRC_OVER);
+ bool isPixmanSupported = (!this->__useStableRenderer && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || bitmap.__isPremultiplied));
if (isPixmanSupported)
{
const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo();
{
- if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && GetCompositeMode() != COMPOSITE_MODE_SRC_OVER)
+ if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || srcBitmap.__isPremultiplied))
{
_Util::Rectangle<int> srcBounds =
{
const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo();
{
- if (srcBufferInfo.bitsPerPixel == 32 && GetCompositeMode() != COMPOSITE_MODE_SRC_OVER)
+ if (srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || srcBitmap.__isPremultiplied))
{
_Util::Rectangle<int> outRect = { 0, 0, -1, -1 };
_Util::Rectangle<int> dstRect = { destRect.x, destRect.y, destRect.width, destRect.height };