Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Drew DeVault
xserver
Commits
5fadea5d
Commit
5fadea5d
authored
Aug 24, 2009
by
Eric Anholt
Committed by
Zhigang Gong
Sep 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
glamor: Fix some screen_xy offsets to be the right way around.
parent
44e4599b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
glamor/glamor_putimage.c
glamor/glamor_putimage.c
+1
-1
glamor/glamor_tile.c
glamor/glamor_tile.c
+4
-7
No files found.
glamor/glamor_putimage.c
View file @
5fadea5d
...
...
@@ -111,7 +111,7 @@ glamor_put_image(DrawablePtr drawable, GCPtr gc, int depth, int x, int y,
continue
;
src
=
bits
+
(
y1
-
y
)
*
src_stride
+
(
x1
-
x
)
*
(
bpp
/
8
);
glRasterPos2i
(
x1
+
pixmap
->
screen_x
,
y1
+
pixmap
->
screen_y
);
glRasterPos2i
(
x1
-
pixmap
->
screen_x
,
y1
-
pixmap
->
screen_y
);
glDrawPixels
(
x2
-
x1
,
y2
-
y1
,
format
,
type
,
...
...
glamor/glamor_tile.c
View file @
5fadea5d
...
...
@@ -92,10 +92,10 @@ glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
int
x2
=
x
+
width
;
int
y1
=
y
;
int
y2
=
y
+
height
;
int
tile_x1
=
tile_x
+
tile
->
screen_x
;
int
tile_x2
=
tile_x
+
tile
->
screen_x
+
width
;
int
tile_y1
=
tile_y
+
tile
->
screen_y
;
int
tile_y2
=
tile_y
+
tile
->
screen_y
+
height
;
int
tile_x1
=
tile_x
-
tile
->
screen_x
;
int
tile_x2
=
tile_x
-
tile
->
screen_x
+
width
;
int
tile_y1
=
tile_y
-
tile
->
screen_y
;
int
tile_y2
=
tile_y
-
tile
->
screen_y
+
height
;
glamor_pixmap_private
*
tile_priv
=
glamor_get_pixmap_private
(
tile
);
if
(
glamor_priv
->
tile_prog
==
0
)
{
...
...
@@ -121,9 +121,6 @@ glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glEnable
(
GL_TEXTURE_2D
);
tile_x
+=
tile
->
screen_x
;
tile_y
+=
tile
->
screen_y
;
glBegin
(
GL_TRIANGLE_FAN
);
glMultiTexCoord2f
(
0
,
tile_x1
,
tile_y1
);
glVertex2f
(
x1
,
y1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment