[gegl-qt] NodeViewImplementation: Use premultiplied alpha
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-qt] NodeViewImplementation: Use premultiplied alpha
- Date: Sat, 24 Sep 2011 20:19:03 +0000 (UTC)
commit bddb5d91da6b1f6d48a1d050508611b9943da5c9
Author: Jon Nordby <jononor gmail com>
Date: Sat Sep 24 18:51:23 2011 +0200
NodeViewImplementation: Use premultiplied alpha
Should be faster.
gegl-qt/internal/nodeviewimplementation.cpp | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gegl-qt/internal/nodeviewimplementation.cpp b/gegl-qt/internal/nodeviewimplementation.cpp
index 5c23ddb..c87dfda 100644
--- a/gegl-qt/internal/nodeviewimplementation.cpp
+++ b/gegl-qt/internal/nodeviewimplementation.cpp
@@ -285,12 +285,7 @@ NodeViewImplementation::paint(QPainter *painter, const QRectF & viewRect)
guchar *buffer = NULL;
GeglRectangle roi;
- Babl *format = babl_format_new(babl_model("R'G'B'A"), babl_type ("u8"),
- babl_component ("B'"),
- babl_component ("G'"),
- babl_component ("R'"),
- babl_component ("A"),
- NULL);
+ Babl *format = babl_format("B'aG'aR'aA u8");
if (!format) {
qCritical() << "Unknown Babl format";
@@ -311,7 +306,7 @@ NodeViewImplementation::paint(QPainter *painter, const QRectF & viewRect)
GEGL_AUTO_ROWSTRIDE, GEGL_BLIT_CACHE);
QImage image(buffer, roi.width, roi.height, roi.width*4,
- QImage::Format_ARGB32);
+ QImage::QImage::Format_ARGB32_Premultiplied);
painter->scale(options()->scale(), options()->scale());
painter->drawImage(QPointF(), image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]