From 95d4a5a6ab58625d8205461157263bfb635ccd1a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 8 Feb 2010 19:38:00 +0100 Subject: [PATCH] glamor: Enable fill acceleration and flip opposite for pixmaps too. Here's my theory for the flipping: It doesn't really matter which orientation we store the pixmaps if we don't scan them out. We have to flip coordinates for the window system framebuffer. Doing so for everything else makes things consistent. I'm not sure how this will interact with future GLX integration, though. --- glamor/glamor_core.c | 7 +------ glamor/glamor_fill.c | 2 -- glamor/glamor_polyfillrect.c | 3 ++- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c index 4ec8540f0..ca7add4ac 100644 --- a/glamor/glamor_core.c +++ b/glamor/glamor_core.c @@ -177,12 +177,7 @@ glamor_set_transform_for_pixmap(PixmapPtr pixmap, glUniform1fARB(uniform_locations->x_bias, -pixmap->drawable.width / 2.0f); glUniform1fARB(uniform_locations->x_scale, 2.0f / pixmap->drawable.width); glUniform1fARB(uniform_locations->y_bias, -pixmap->drawable.height / 2.0f); - if (pixmap == screen_pixmap) - glUniform1fARB(uniform_locations->y_scale, - -2.0f / pixmap->drawable.height); - else - glUniform1fARB(uniform_locations->y_scale, - 2.0f / pixmap->drawable.height); + glUniform1fARB(uniform_locations->y_scale, -2.0f / pixmap->drawable.height); } GLint diff --git a/glamor/glamor_fill.c b/glamor/glamor_fill.c index b3418a91d..6290f1210 100644 --- a/glamor/glamor_fill.c +++ b/glamor/glamor_fill.c @@ -42,8 +42,6 @@ glamor_fill(DrawablePtr drawable, { PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(drawable); - assert(0); - switch (gc->fillStyle) { case FillSolid: glamor_solid(dst_pixmap, diff --git a/glamor/glamor_polyfillrect.c b/glamor/glamor_polyfillrect.c index dc3c0e69a..62e0a0fe4 100644 --- a/glamor/glamor_polyfillrect.c +++ b/glamor/glamor_polyfillrect.c @@ -52,7 +52,8 @@ glamor_poly_fill_rect(DrawablePtr drawable, int xorg, yorg; int n; - goto fail; + if (gc->fillStyle != FillSolid) + goto fail; xorg = drawable->x; yorg = drawable->y;