summaryrefslogtreecommitdiff
path: root/render/miglyph.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-08-01 15:48:30 -0700
committerCarl Worth <cworth@cworth.org>2007-08-02 22:49:56 -0700
commita2af34d5a861982a03afad8e586bb0181b72bbd0 (patch)
tree0e423afde57f7d875c8a08f134bf1eb7e07276c0 /render/miglyph.c
parent19b3b1fd8feb343a690331cafe88ef10b34b9d98 (diff)
Use per-screen Pixmaps for glyphs
Instead of system-memory data which prevents accelerated compositing of glyphs, (at least without forcing an upload of the glyph data before compositing).
Diffstat (limited to 'render/miglyph.c')
-rw-r--r--render/miglyph.c40
1 files changed, 10 insertions, 30 deletions
diff --git a/render/miglyph.c b/render/miglyph.c
index 7968c90ea..2aa94bd09 100644
--- a/render/miglyph.c
+++ b/render/miglyph.c
@@ -112,7 +112,7 @@ miGlyphs (CARD8 op,
GlyphListPtr list,
GlyphPtr *glyphs)
{
- PixmapPtr pPixmap = 0;
+ PixmapPtr pPixmap;
PicturePtr pPicture;
PixmapPtr pMaskPixmap = 0;
PicturePtr pMask;
@@ -166,7 +166,6 @@ miGlyphs (CARD8 op,
x = 0;
y = 0;
}
- pPicture = 0;
while (nlist--)
{
x += list->xOff;
@@ -175,28 +174,14 @@ miGlyphs (CARD8 op,
while (n--)
{
glyph = *glyphs++;
+ pPixmap = GlyphPixmap (glyph)[pScreen->myNum];
+ component_alpha = NeedsComponent(list->format->format);
+ pPicture = CreatePicture (0, &pPixmap->drawable, list->format,
+ CPComponentAlpha, &component_alpha,
+ serverClient, &error);
if (!pPicture)
- {
- pPixmap = GetScratchPixmapHeader (pScreen, glyph->info.width, glyph->info.height,
- list->format->depth,
- list->format->depth,
- 0, (pointer) (glyph + 1));
- if (!pPixmap)
- return;
- component_alpha = NeedsComponent(list->format->format);
- pPicture = CreatePicture (0, &pPixmap->drawable, list->format,
- CPComponentAlpha, &component_alpha,
- serverClient, &error);
- if (!pPicture)
- {
- FreeScratchPixmapHeader (pPixmap);
- return;
- }
- }
- (*pScreen->ModifyPixmapHeader) (pPixmap,
- glyph->info.width, glyph->info.height,
- 0, 0, -1, (pointer) (glyph + 1));
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ return;
+
if (maskFormat)
{
CompositePicture (PictOpAdd,
@@ -224,17 +209,12 @@ miGlyphs (CARD8 op,
glyph->info.width,
glyph->info.height);
}
+ FreePicture ((pointer) pPicture, 0);
+
x += glyph->info.xOff;
y += glyph->info.yOff;
}
list++;
- if (pPicture)
- {
- FreeScratchPixmapHeader (pPixmap);
- FreePicture ((pointer) pPicture, 0);
- pPicture = 0;
- pPixmap = 0;
- }
}
if (maskFormat)
{