aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glamor')
-rw-r--r--xorg-server/glamor/glamor_egl.c1
-rw-r--r--xorg-server/glamor/glamor_eglmodule.c1
-rw-r--r--xorg-server/glamor/glamor_priv.h1
-rw-r--r--xorg-server/glamor/glamor_xv.c13
4 files changed, 8 insertions, 8 deletions
diff --git a/xorg-server/glamor/glamor_egl.c b/xorg-server/glamor/glamor_egl.c
index 54af2753e..182e2e8c9 100644
--- a/xorg-server/glamor/glamor_egl.c
+++ b/xorg-server/glamor/glamor_egl.c
@@ -30,7 +30,6 @@
#include "dix-config.h"
#define GLAMOR_FOR_XORG
-#include <xorg-server.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
diff --git a/xorg-server/glamor/glamor_eglmodule.c b/xorg-server/glamor/glamor_eglmodule.c
index d7e183649..dd4664b22 100644
--- a/xorg-server/glamor/glamor_eglmodule.c
+++ b/xorg-server/glamor/glamor_eglmodule.c
@@ -29,7 +29,6 @@
#include "dix-config.h"
-#include <xorg-server.h>
#include <xf86.h>
#define GLAMOR_FOR_XORG
#include <xf86Module.h>
diff --git a/xorg-server/glamor/glamor_priv.h b/xorg-server/glamor/glamor_priv.h
index 57a46873c..385c0279d 100644
--- a/xorg-server/glamor/glamor_priv.h
+++ b/xorg-server/glamor/glamor_priv.h
@@ -29,7 +29,6 @@
#include "dix-config.h"
-#include <xorg-server.h>
#include "glamor.h"
#include "xvdix.h"
diff --git a/xorg-server/glamor/glamor_xv.c b/xorg-server/glamor/glamor_xv.c
index 68a06a413..3f3e064d5 100644
--- a/xorg-server/glamor/glamor_xv.c
+++ b/xorg-server/glamor/glamor_xv.c
@@ -336,6 +336,7 @@ glamor_xv_render(glamor_port_private *port_priv)
GL_FALSE, 2 * sizeof(float), vertices);
glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
+ glEnable(GL_SCISSOR_TEST);
for (i = 0; i < nBox; i++) {
float off_x = box[i].x1 - port_priv->drw_x;
float off_y = box[i].y1 - port_priv->drw_y;
@@ -356,23 +357,25 @@ glamor_xv_render(glamor_port_private *port_priv)
glamor_set_normalize_vcoords(pixmap_priv,
dst_xscale, dst_yscale,
- dstx,
+ dstx - dstw,
dsty,
dstx + dstw,
- dsty + dsth,
+ dsty + dsth * 2,
vertices);
glamor_set_normalize_tcoords(src_pixmap_priv[0],
src_xscale[0],
src_yscale[0],
- srcx,
+ srcx - srcw,
srcy,
srcx + srcw,
- srcy + srch,
+ srcy + srch * 2,
texcoords);
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glScissor(dstx, dsty, dstw, dsth);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 3);
}
+ glDisable(GL_SCISSOR_TEST);
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);