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
27b0b88a
Commit
27b0b88a
authored
Sep 06, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a graphics driver to render windows contents through the DIB engine.
parent
d97d3425
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
5 deletions
+46
-5
clipping.c
dlls/gdi32/clipping.c
+5
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+0
-0
gdi32.spec
dlls/gdi32/gdi32.spec
+1
-1
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
painting.c
dlls/user32/painting.c
+1
-1
gdi_driver.h
include/wine/gdi_driver.h
+38
-1
No files found.
dlls/gdi32/clipping.c
View file @
27b0b88a
...
...
@@ -268,13 +268,15 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
/***********************************************************************
* __wine_set_visible_region (GDI32.@)
*/
void
CDECL
__wine_set_visible_region
(
HDC
hdc
,
HRGN
hrgn
,
const
RECT
*
vis_rect
,
const
RECT
*
device_rect
)
void
CDECL
__wine_set_visible_region
(
HDC
hdc
,
HRGN
hrgn
,
const
RECT
*
vis_rect
,
const
RECT
*
device_rect
,
struct
window_surface
*
surface
)
{
DC
*
dc
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
;
TRACE
(
"%p %p %s %s
\n
"
,
hdc
,
hrgn
,
wine_dbgstr_rect
(
vis_rect
),
wine_dbgstr_rect
(
device_rect
)
);
TRACE
(
"%p %p %s %s %p
\n
"
,
hdc
,
hrgn
,
wine_dbgstr_rect
(
vis_rect
),
wine_dbgstr_rect
(
device_rect
),
surface
);
/* map region to DC coordinates */
OffsetRgn
(
hrgn
,
-
vis_rect
->
left
,
-
vis_rect
->
top
);
...
...
@@ -284,6 +286,7 @@ void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect,
dc
->
vis_rect
=
*
vis_rect
;
dc
->
device_rect
=
*
device_rect
;
dc
->
hVisRgn
=
hrgn
;
dibdrv_set_window_surface
(
dc
,
surface
);
DC_UpdateXforms
(
dc
);
update_dc_clipping
(
dc
);
release_dc_ptr
(
dc
);
...
...
dlls/gdi32/dibdrv/dc.c
View file @
27b0b88a
This diff is collapsed.
Click to expand it.
dlls/gdi32/gdi32.spec
View file @
27b0b88a
...
...
@@ -511,7 +511,7 @@
# GDI objects
@ cdecl __wine_make_gdi_object_system(long long)
@ cdecl __wine_set_visible_region(long long ptr ptr)
@ cdecl __wine_set_visible_region(long long ptr ptr
ptr
)
# OpenGL
@ cdecl __wine_get_wgl_driver(long long)
dlls/gdi32/gdi_private.h
View file @
27b0b88a
...
...
@@ -283,6 +283,7 @@ extern DWORD get_image_from_bitmap( BITMAPOBJ *bmp, BITMAPINFO *info,
extern
DWORD
put_image_into_bitmap
(
BITMAPOBJ
*
bmp
,
HRGN
clip
,
BITMAPINFO
*
info
,
const
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
,
struct
bitblt_coords
*
dst
)
DECLSPEC_HIDDEN
;
extern
void
dibdrv_set_window_surface
(
DC
*
dc
,
struct
window_surface
*
surface
)
DECLSPEC_HIDDEN
;
/* driver.c */
extern
const
struct
gdi_dc_funcs
null_driver
DECLSPEC_HIDDEN
;
...
...
dlls/user32/painting.c
View file @
27b0b88a
...
...
@@ -162,7 +162,7 @@ static void update_visible_region( struct dce *dce )
(
flags
&
DCX_INTERSECTRGN
)
?
RGN_AND
:
RGN_DIFF
);
top_rect
=
get_virtual_screen_rect
();
__wine_set_visible_region
(
dce
->
hdc
,
vis_rgn
,
&
win_rect
,
&
top_rect
);
__wine_set_visible_region
(
dce
->
hdc
,
vis_rgn
,
&
win_rect
,
&
top_rect
,
NULL
);
}
...
...
include/wine/gdi_driver.h
View file @
27b0b88a
...
...
@@ -21,6 +21,8 @@
#ifndef __WINE_WINE_GDI_DRIVER_H
#define __WINE_WINE_GDI_DRIVER_H
#include "wine/list.h"
struct
gdi_dc_funcs
;
struct
opengl_funcs
;
...
...
@@ -222,6 +224,41 @@ static inline void push_dc_driver( PHYSDEV *dev, PHYSDEV physdev, const struct g
*
dev
=
physdev
;
}
/* support for window surfaces */
struct
window_surface
;
struct
window_surface_funcs
{
void
(
*
lock
)(
struct
window_surface
*
surface
);
void
(
*
unlock
)(
struct
window_surface
*
surface
);
void
*
(
*
get_info
)(
struct
window_surface
*
surface
,
BITMAPINFO
*
info
);
RECT
*
(
*
get_bounds
)(
struct
window_surface
*
surface
);
void
(
*
flush
)(
struct
window_surface
*
surface
);
void
(
*
destroy
)(
struct
window_surface
*
surface
);
};
struct
window_surface
{
const
struct
window_surface_funcs
*
funcs
;
/* driver-specific implementations */
struct
list
entry
;
/* entry in global list managed by user32 */
LONG
ref
;
/* reference count */
RECT
rect
;
/* constant, no locking needed */
/* driver-specific fields here */
};
static
inline
ULONG
window_surface_add_ref
(
struct
window_surface
*
surface
)
{
return
InterlockedIncrement
(
&
surface
->
ref
);
}
static
inline
ULONG
window_surface_release
(
struct
window_surface
*
surface
)
{
ULONG
ret
=
InterlockedDecrement
(
&
surface
->
ref
);
if
(
!
ret
)
surface
->
funcs
->
destroy
(
surface
);
return
ret
;
}
/* the DC hook support is only exported on Win16, the 32-bit version is a Wine extension */
#define DCHC_INVALIDVISRGN 0x0001
...
...
@@ -237,7 +274,7 @@ WINGDIAPI WORD WINAPI SetHookFlags(HDC,WORD);
extern
void
CDECL
__wine_make_gdi_object_system
(
HGDIOBJ
handle
,
BOOL
set
);
extern
void
CDECL
__wine_set_visible_region
(
HDC
hdc
,
HRGN
hrgn
,
const
RECT
*
vis_rect
,
const
RECT
*
device_rect
);
const
RECT
*
device_rect
,
struct
window_surface
*
surface
);
extern
struct
opengl_funcs
*
CDECL
__wine_get_wgl_driver
(
HDC
hdc
,
UINT
version
);
#endif
/* __WINE_WINE_GDI_DRIVER_H */
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