Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
771d61a8
Commit
771d61a8
authored
Oct 10, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use ExtEscape to flush the GL drawable to the physdev.
Based on a patch by Chris Robinson.
parent
235532ce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
init.c
dlls/winex11.drv/init.c
+3
-0
opengl.c
dlls/winex11.drv/opengl.c
+13
-4
x11drv.h
dlls/winex11.drv/x11drv.h
+3
-1
No files found.
dlls/winex11.drv/init.c
View file @
771d61a8
...
...
@@ -436,6 +436,9 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
return
TRUE
;
}
return
FALSE
;
case
X11DRV_FLUSH_GL_DRAWABLE
:
flush_gl_drawable
(
physDev
);
return
TRUE
;
}
}
break
;
...
...
dlls/winex11.drv/opengl.c
View file @
771d61a8
...
...
@@ -1967,7 +1967,7 @@ static void WINAPI X11DRV_wglGetIntegerv(GLenum pname, GLint* params)
wine_tsx11_unlock
();
}
static
inline
void
update
_drawable
(
X11DRV_PDEVICE
*
physDev
)
void
flush_gl
_drawable
(
X11DRV_PDEVICE
*
physDev
)
{
int
w
,
h
;
...
...
@@ -1983,9 +1983,11 @@ static inline void update_drawable(X11DRV_PDEVICE *physDev)
/* The GL drawable may be lagged behind if we don't flush first, so
* flush the display make sure we copy up-to-date data */
wine_tsx11_lock
();
XFlush
(
gdi_display
);
XCopyArea
(
gdi_display
,
src
,
physDev
->
drawable
,
physDev
->
gc
,
0
,
0
,
w
,
h
,
physDev
->
dc_rect
.
left
,
physDev
->
dc_rect
.
top
);
wine_tsx11_unlock
();
}
}
...
...
@@ -1993,23 +1995,25 @@ static inline void update_drawable(X11DRV_PDEVICE *physDev)
static
void
WINAPI
X11DRV_wglFinish
(
void
)
{
Wine_GLContext
*
ctx
=
NtCurrentTeb
()
->
glContext
;
enum
x11drv_escape_codes
code
=
X11DRV_FLUSH_GL_DRAWABLE
;
wine_tsx11_lock
();
sync_context
(
ctx
);
pglFinish
();
update_drawable
(
ctx
->
physDev
);
wine_tsx11_unlock
();
ExtEscape
(
ctx
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
0
,
NULL
);
}
static
void
WINAPI
X11DRV_wglFlush
(
void
)
{
Wine_GLContext
*
ctx
=
NtCurrentTeb
()
->
glContext
;
enum
x11drv_escape_codes
code
=
X11DRV_FLUSH_GL_DRAWABLE
;
wine_tsx11_lock
();
sync_context
(
ctx
);
pglFlush
();
update_drawable
(
ctx
->
physDev
);
wine_tsx11_unlock
();
ExtEscape
(
ctx
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
0
,
NULL
);
}
/**
...
...
@@ -3292,7 +3296,8 @@ BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev)
}
else
pglXSwapBuffers
(
gdi_display
,
drawable
);
update_drawable
(
physDev
);
flush_gl_drawable
(
physDev
);
wine_tsx11_unlock
();
/* FPS support */
...
...
@@ -3375,6 +3380,10 @@ void mark_drawable_dirty(Drawable old, Drawable new)
{
}
void
flush_gl_drawable
(
X11DRV_PDEVICE
*
physDev
)
{
}
Drawable
create_glxpixmap
(
Display
*
display
,
XVisualInfo
*
vis
,
Pixmap
parent
)
{
return
0
;
...
...
dlls/winex11.drv/x11drv.h
View file @
771d61a8
...
...
@@ -477,7 +477,8 @@ enum x11drv_escape_codes
X11DRV_GET_DCE
,
/* get the DCE pointer */
X11DRV_SET_DCE
,
/* set the DCE pointer */
X11DRV_GET_GLX_DRAWABLE
,
/* get current glx drawable for a DC */
X11DRV_SYNC_PIXMAP
/* sync the dibsection to its pixmap */
X11DRV_SYNC_PIXMAP
,
/* sync the dibsection to its pixmap */
X11DRV_FLUSH_GL_DRAWABLE
/* flush changes made to the gl drawable */
};
struct
x11drv_escape_set_drawable
...
...
@@ -676,6 +677,7 @@ extern int pixelformat_from_fbconfig_id( XID fbconfig_id );
extern
XVisualInfo
*
visual_from_fbconfig_id
(
XID
fbconfig_id
);
extern
void
mark_drawable_dirty
(
Drawable
old
,
Drawable
new
);
extern
Drawable
create_glxpixmap
(
Display
*
display
,
XVisualInfo
*
vis
,
Pixmap
parent
);
extern
void
flush_gl_drawable
(
X11DRV_PDEVICE
*
physDev
);
extern
void
alloc_window_dce
(
struct
x11drv_win_data
*
data
);
extern
void
free_window_dce
(
struct
x11drv_win_data
*
data
);
...
...
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