[PATCH 4/4] glamor: Drop constant arguments to glamor_solid().

Eric Anholt eric at anholt.net
Sun Jun 15 22:28:43 PDT 2014


After keithp's change to drop the old glamor_fill() code, nothing ever
changed these values.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_glyphs.c    | 4 ++--
 glamor/glamor_priv.h      | 1 -
 glamor/glamor_trapezoid.c | 3 +--
 glamor/glamor_utils.c     | 9 +++------
 4 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/glamor/glamor_glyphs.c b/glamor/glamor_glyphs.c
index ba7d342..f570d75 100644
--- a/glamor/glamor_glyphs.c
+++ b/glamor/glamor_glyphs.c
@@ -168,7 +168,7 @@ clear_mask_cache(struct glamor_glyph_mask_cache *maskcache)
     struct glamor_glyph_mask_cache_entry *mce;
 
     glamor_solid(maskcache->pixmap, 0, CACHE_PICTURE_SIZE, CACHE_PICTURE_SIZE,
-                 MASK_CACHE_MAX_SIZE, GXcopy, 0xFFFFFFFF, 0);
+                 MASK_CACHE_MAX_SIZE, 0);
     mce = &maskcache->mcache[0];
     while (cnt--) {
         mce->width = 0;
@@ -1433,7 +1433,7 @@ glamor_glyphs_via_mask(CARD8 op,
             glamor_destroy_pixmap(mask_pixmap);
             return;
         }
-        glamor_solid(mask_pixmap, 0, 0, width, height, GXcopy, 0xFFFFFFFF, 0);
+        glamor_solid(mask_pixmap, 0, 0, width, height, 0);
         component_alpha = NeedsComponent(mask_format->format);
         mask = CreatePicture(0, &mask_pixmap->drawable,
                              mask_format, CPComponentAlpha,
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 535d0ca..670cdd3 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -1025,7 +1025,6 @@ void glamor_composite_rectangles(CARD8 op,
 /* glamor_util.c */
 void
 glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height,
-             unsigned char alu, unsigned long planemask,
              unsigned long fg_pixel);
 
 void
diff --git a/glamor/glamor_trapezoid.c b/glamor/glamor_trapezoid.c
index 4ad0672..cdf5fa2 100644
--- a/glamor/glamor_trapezoid.c
+++ b/glamor/glamor_trapezoid.c
@@ -1393,8 +1393,7 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture,
 
     /* First, clear all to zero */
     glamor_solid(pixmap, 0, 0, pixmap_priv->base.pixmap->drawable.width,
-                 pixmap_priv->base.pixmap->drawable.height,
-                 GXclear, 0xFFFFFFFF, 0);
+                 pixmap_priv->base.pixmap->drawable.height, 0);
 
     glamor_make_current(glamor_priv);
 
diff --git a/glamor/glamor_utils.c b/glamor/glamor_utils.c
index 5459d79..f068960 100644
--- a/glamor/glamor_utils.c
+++ b/glamor/glamor_utils.c
@@ -56,21 +56,18 @@ glamor_solid_boxes(PixmapPtr pixmap,
 
 void
 glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height,
-             unsigned char alu, unsigned long planemask,
              unsigned long fg_pixel)
 {
     DrawablePtr drawable = &pixmap->drawable;
     GCPtr gc;
-    ChangeGCVal vals[3];
+    ChangeGCVal vals[1];
     xRectangle rect;
 
-    vals[0].val = alu;
-    vals[1].val = planemask;
-    vals[2].val = fg_pixel;
+    vals[0].val = fg_pixel;
     gc = GetScratchGC(drawable->depth, drawable->pScreen);
     if (!gc)
         return;
-    ChangeGC(NullClient, gc, GCFunction|GCPlaneMask|GCForeground, vals);
+    ChangeGC(NullClient, gc, GCForeground, vals);
     ValidateGC(drawable, gc);
     rect.x = x;
     rect.y = y;
-- 
2.0.0



More information about the xorg-devel mailing list