diff options
author | Eric Anholt <eric@anholt.net> | 2010-02-08 19:38:00 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-02-08 19:42:18 +0100 |
commit | 0e170986f2659b0884fb69237c653efe180260cf (patch) | |
tree | 8de5b236015673d1c9352a07bd01824a24ad098d | |
parent | 3e57c5a23b16e32fd9c039135cf4865fe823b5c0 (diff) |
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.
-rw-r--r-- | glamor/glamor_core.c | 7 | ||||
-rw-r--r-- | glamor/glamor_fill.c | 2 | ||||
-rw-r--r-- | 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; |