diff options
Diffstat (limited to 'xorg/server/module/rdpReg.c')
-rw-r--r-- | xorg/server/module/rdpReg.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xorg/server/module/rdpReg.c b/xorg/server/module/rdpReg.c index 20600f66..8ff7d79d 100644 --- a/xorg/server/module/rdpReg.c +++ b/xorg/server/module/rdpReg.c @@ -244,3 +244,22 @@ rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect) rdpRegionUnion(pReg, pReg, ®); rdpRegionUninit(®); } + +/*****************************************************************************/ +int +rdpRegionPixelCount(RegionPtr pReg) +{ + int index; + int count; + int rv; + BoxRec box; + + rv = 0; + count = REGION_NUM_RECTS(pReg); + for (index = 0; index < count; index++) + { + box = REGION_RECTS(pReg)[index]; + rv += (box.x2 - box.x1) * (box.y2 - box.y1); + } + return rv; +} |