[PATCH] render: Delete GlyphRealize/Unrealize hooks.

Søren Sandmann sandmann at cs.au.dk
Wed Apr 20 06:08:24 PDT 2011


From: Søren Sandmann Pedersen <ssp at redhat.com>

Nothing uses them.
---
 render/glyph.c      |   45 +--------------------------------------------
 render/mipict.c     |    2 --
 render/mipict.h     |    8 --------
 render/picturestr.h |    9 ---------
 4 files changed, 1 insertions(+), 63 deletions(-)

diff --git a/render/glyph.c b/render/glyph.c
index 7193d47..2d4ce42 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -87,7 +87,6 @@ static GlyphHashRec	globalGlyphs[GlyphFormatNum];
 void
 GlyphUninit (ScreenPtr pScreen)
 {
-    PictureScreenPtr ps = GetPictureScreen (pScreen);
     GlyphPtr	     glyph;
     int		     fdepth, i;
     int		     scrno = pScreen->myNum;
@@ -107,7 +106,6 @@ GlyphUninit (ScreenPtr pScreen)
 		    FreePicture ((pointer) GlyphPicture (glyph)[scrno], 0);
 		    GlyphPicture(glyph)[scrno] = NULL;
 		}
-		(*ps->UnrealizeGlyph) (pScreen, glyph);
 	    }
 	}
     }
@@ -142,7 +140,7 @@ FindGlyphRef (GlyphHashPtr	hash,
     for (;;)
     {
 	gr = &table[elt];
-	s = gr->signature;
+	s = gr->glyph->sha1[0];
 	glyph = gr->glyph;
 	if (!glyph)
 	{
@@ -249,19 +247,12 @@ CheckDuplicates (GlyphHashPtr hash, char *where)
 static void
 FreeGlyphPicture(GlyphPtr glyph)
 {
-    PictureScreenPtr ps;
     int i;
 
     for (i = 0; i < screenInfo.numScreens; i++)
     {
-        ScreenPtr pScreen = screenInfo.screens[i];
-
         if (GlyphPicture(glyph)[i])
             FreePicture ((pointer) GlyphPicture (glyph)[i], 0);
-
-        ps = GetPictureScreenIfSet (pScreen);
-        if (ps)
-            (*ps->UnrealizeGlyph) (pScreen, glyph);
     }
 }
 
@@ -371,7 +362,6 @@ FindGlyph (GlyphSetPtr glyphSet, Glyph id)
 GlyphPtr
 AllocateGlyph (xGlyphInfo *gi, int fdepth)
 {
-    PictureScreenPtr ps;
     int		     size;
     GlyphPtr	     glyph;
     int		     i;
@@ -388,29 +378,9 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
     dixInitPrivates(glyph, (char *) glyph + head_size, PRIVATE_GLYPH);
 
     for (i = 0; i < screenInfo.numScreens; i++)
-    {
 	GlyphPicture(glyph)[i] = NULL;
-	ps = GetPictureScreenIfSet (screenInfo.screens[i]);
-
-	if (ps)
-	{
-	    if (!(*ps->RealizeGlyph) (screenInfo.screens[i], glyph))
-		goto bail;
-	}
-    }
     
     return glyph;
-
-bail:
-    while (i--)
-    {
-	ps = GetPictureScreenIfSet (screenInfo.screens[i]);
-	if (ps)
-	    (*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph);
-    }
-
-    dixFreeObjectWithPrivates(glyph, PRIVATE_GLYPH);
-    return 0;
 }
     
 Bool
@@ -604,19 +574,6 @@ CompositeGlyphs (CARD8		op,
     (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, lists, glyphs);
 }
 
-Bool
-miRealizeGlyph (ScreenPtr pScreen,
-		GlyphPtr  glyph)
-{
-    return TRUE;
-}
-
-void
-miUnrealizeGlyph (ScreenPtr pScreen,
-		  GlyphPtr  glyph)
-{
-}
-
 void
 miGlyphs (CARD8		op,
 	  PicturePtr	pSrc,
diff --git a/render/mipict.c b/render/mipict.c
index 9decd39..1122244 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -592,8 +592,6 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
     ps->UpdateIndexed = miUpdateIndexed;
     ps->ChangePictureTransform = miChangePictureTransform;
     ps->ChangePictureFilter = miChangePictureFilter;
-    ps->RealizeGlyph = miRealizeGlyph;
-    ps->UnrealizeGlyph = miUnrealizeGlyph;
 
     /* MI rendering routines */
     ps->Composite	= 0;			/* requires DDX support */
diff --git a/render/mipict.h b/render/mipict.h
index f6d9dee..d14d256 100644
--- a/render/mipict.h
+++ b/render/mipict.h
@@ -100,14 +100,6 @@ miComputeCompositeRegion (RegionPtr	pRegion,
 extern _X_EXPORT Bool
 miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
 
-extern _X_EXPORT Bool
-miRealizeGlyph (ScreenPtr pScreen,
-		GlyphPtr  glyph);
-
-extern _X_EXPORT void
-miUnrealizeGlyph (ScreenPtr pScreen,
-		  GlyphPtr  glyph);
-
 extern _X_EXPORT void
 miGlyphs (CARD8		op,
 	  PicturePtr	pSrc,
diff --git a/render/picturestr.h b/render/picturestr.h
index 7b7f911..f8938b4 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -283,12 +283,6 @@ typedef void	(*AddTrianglesProcPtr)	    (PicturePtr	    pPicture,
 					     int	    ntri,
 					     xTriangle	    *tris);
 
-typedef Bool	(*RealizeGlyphProcPtr)	    (ScreenPtr	    pScreen,
-					     GlyphPtr	    glyph);
-
-typedef void	(*UnrealizeGlyphProcPtr)    (ScreenPtr	    pScreen,
-					     GlyphPtr	    glyph);
-
 typedef struct _PictureScreen {
     PictFormatPtr		formats;
     PictFormatPtr		fallback;
@@ -345,9 +339,6 @@ typedef struct _PictureScreen {
 
     AddTrapsProcPtr		AddTraps;
 
-    RealizeGlyphProcPtr   	RealizeGlyph;
-    UnrealizeGlyphProcPtr 	UnrealizeGlyph;
-
 } PictureScreenRec, *PictureScreenPtr;
 
 extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
-- 
1.7.4



More information about the xorg-devel mailing list