[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kolor-manager/kded] kolor-server: Add debugging messages for regions
From: Casian Andrei <skeletk13 () gmail ! com>
Date: 2013-02-24 17:42:22
Message-ID: 20130224174222.089F3A60CB () git ! kde ! org
[Download RAW message or body]
Git commit 69226f16e6e1ac9e4d5ae7efffcca23091d29efc by Casian Andrei.
Committed on 24/02/2013 at 18:39.
Pushed by casianandrei into branch 'kded'.
Add debugging messages for regions
M +8 -0 kolor-server/color-lookup-table.h
M +4 -0 kolor-server/screen.cpp
M +2 -0 kolor-server/window.cpp
http://commits.kde.org/kolor-manager/69226f16e6e1ac9e4d5ae7efffcca23091d29efc
diff --git a/kolor-server/color-lookup-table.h b/kolor-server/color-lookup-table.h
index 3f0986e..df7199e 100644
--- a/kolor-server/color-lookup-table.h
+++ b/kolor-server/color-lookup-table.h
@@ -105,4 +105,12 @@ inline static void buildDummyClut(Clut &c)
}
}
+inline static quint16 clutChecksum(const Clut &c)
+{
+ quint16 checksum = 0;
+ for (int i = 0; i < c.size(); ++i)
+ checksum ^= c[i];
+ return checksum;
+}
+
#endif // COLOR_LOOKUP_TABLE_H_
diff --git a/kolor-server/screen.cpp b/kolor-server/screen.cpp
index a9a3b44..c6ac80a 100644
--- a/kolor-server/screen.cpp
+++ b/kolor-server/screen.cpp
@@ -322,6 +322,10 @@ void Screen::updateWindowRegions(uint windowId)
rclut.outputIndex = i_output;
rclut.clut = m_windows[i]->regionColorContext(i_region, i_output)->colorLookupTable();
m_regionCluts.insert((uint) m_windows[i]->id(), rclut);
+
+ kDebug() << "Regional clut:" << "windowId:" << rclut.windowId <<
+ "outputIndex:" << rclut.outputIndex << "region:" << rclut.region <<
+ "clutChecksum:" << clutChecksum(rclut.clut);
}
}
}
diff --git a/kolor-server/window.cpp b/kolor-server/window.cpp
index ea243e1..4325273 100644
--- a/kolor-server/window.cpp
+++ b/kolor-server/window.cpp
@@ -123,8 +123,10 @@ void Window::updateRegions(const QList<ColorOutput*> &outputs)
* typedef struct { short x1, x2, y1, y2;} Box, BOX, BoxRec, *BoxPtr;
* typedef struct _XRegion { long size; long numRects; BOX *rects; BOX extents; } REGION;
*/
+ kDebug() << "Region" << i_region;
for (int i_box = 0; i_box < xregion->numRects; ++i_box) {
const X11::Box &b = xregion->rects[i_box];
+ kDebug() << "Box" << i_box << "x1" << b.x1 << "y1" << b.y1 << "x2" << b.x2 << "y2" << b.y2;
region.region |= QRect(QPoint(b.x1, b.y1), QPoint(b.x2, b.y2));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic