[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kolourpaint/pixmapfx (silent)
From: Clarence Dang <dang () kde ! org>
Date: 2007-10-03 4:53:33
Message-ID: 1191387213.913510.23284.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 720452 by dang:
SVN_SILENT comments
M +3 -1 kpPixmapFX_FormatConversion.cpp
M +1 -1 kpPixmapFX_GetSetPixmapParts.cpp
--- trunk/KDE/kdegraphics/kolourpaint/pixmapfx/kpPixmapFX_FormatConversion.cpp #720451:720452
@@ -70,7 +70,8 @@
// Returns true if <image> contains translucency (rather than just transparency)
-// QPixmap::hasAlphaChannel() appears to give incorrect results
+// QPixmap::hasAlphaChannel() is a blind method that doesn't actually check
+// each pixel.
static bool imageHasAlphaChannel (const QImage &image)
{
if (image.depth () < 32)
@@ -92,6 +93,7 @@
static int imageNumColorsUpTo (const QImage &image, int max)
{
+ // OPT: Use hash table, not binary tree.
QMap <QRgb, bool> rgbMap;
if (image.depth () <= 8)
--- trunk/KDE/kdegraphics/kolourpaint/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp #720451:720452
@@ -169,7 +169,7 @@
return retPixmap;
}
- // TODO: we could call setPixmapAt().
+ // REFACTOR: we could call setPixmapAt().
GetSetPaintPixmapAtPack pack;
pack.srcPixmap = ±
pack.destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic