Commit 95d4a5a6 authored by Eric Anholt's avatar Eric Anholt Committed by Zhigang Gong

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.
parent 5332547a
......@@ -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
......
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment