pixman: Branch 'master'
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Sat Jun 16 22:11:01 PDT 2007
pixman/pixman-image.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
New commits:
diff-tree ad80d4d2bc8c4e37a8266b98a2241c0ebd7f0e43 (from 9deaaae3f61f1701b022fe7daa1823a99fda7d00)
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date: Sun Jun 17 01:00:07 2007 -0400
Optimize fill rectangles in the op=PIXMAN_OP_CLEAR case
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index d54e438..2bc3ef6 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -570,18 +570,32 @@ pixman_image_fill_rectangles (pixman_op_
int n_rects,
const pixman_rectangle16_t *rects)
{
- pixman_image_t *solid = pixman_image_create_solid_fill (color);
+ pixman_image_t *solid;
+ pixman_color_t c;
int i;
- if (!solid)
- return FALSE;
-
if (color->alpha == 0xffff)
{
if (op == PIXMAN_OP_OVER)
op = PIXMAN_OP_SRC;
}
+ if (op == PIXMAN_OP_CLEAR)
+ {
+ c.red = 0;
+ c.green = 0;
+ c.blue = 0;
+ c.alpha = 0;
+
+ color = &c;
+
+ op = PIXMAN_OP_SRC;
+ }
+
+ solid = pixman_image_create_solid_fill (color);
+ if (!solid)
+ return FALSE;
+
for (i = 0; i < n_rects; ++i)
{
const pixman_rectangle16_t *rect = &(rects[i]);
More information about the xorg-commit
mailing list