src/gui/painting/qdrawhelper.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 7 3f74d0d4af4c
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
  1362     PRELOAD_INIT2(dest, src)
  1362     PRELOAD_INIT2(dest, src)
  1363     if (const_alpha == 255) {
  1363     if (const_alpha == 255) {
  1364         for (int i = 0; i < length; ++i) {
  1364         for (int i = 0; i < length; ++i) {
  1365             PRELOAD_COND2(dest, src)
  1365             PRELOAD_COND2(dest, src)
  1366             uint s = src[i];
  1366             uint s = src[i];
  1367             dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s));
  1367             if (s >= 0xff000000)
       
  1368                 dest[i] = s;
       
  1369             else if (s != 0)
       
  1370                 dest[i] = s + BYTE_MUL(dest[i], qAlpha(~s));
  1368         }
  1371         }
  1369     } else {
  1372     } else {
  1370         for (int i = 0; i < length; ++i) {
  1373         for (int i = 0; i < length; ++i) {
  1371             PRELOAD_COND2(dest, src)
  1374             PRELOAD_COND2(dest, src)
  1372             uint s = BYTE_MUL(src[i], const_alpha);
  1375             uint s = BYTE_MUL(src[i], const_alpha);