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
46f1d2a4
Commit
46f1d2a4
authored
Sep 26, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Remove redundant pixmap prefix in X_PHYSBITMAP field names.
parent
f3f315ed
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
35 deletions
+34
-35
bitblt.c
dlls/winex11.drv/bitblt.c
+4
-4
bitmap.c
dlls/winex11.drv/bitmap.c
+7
-7
brush.c
dlls/winex11.drv/brush.c
+2
-2
dib.c
dlls/winex11.drv/dib.c
+11
-11
opengl.c
dlls/winex11.drv/opengl.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-2
xrender.c
dlls/winex11.drv/xrender.c
+7
-8
No files found.
dlls/winex11.drv/bitblt.c
View file @
46f1d2a4
...
...
@@ -1710,8 +1710,8 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
{
if
(
!
(
bitmap
=
X11DRV_get_phys_bitmap
(
hbitmap
)))
return
ERROR_INVALID_HANDLE
;
physdev
=
NULL
;
depth
=
bitmap
->
pixmap_
depth
;
color_shifts
=
&
bitmap
->
pixmap_
color_shifts
;
depth
=
bitmap
->
depth
;
color_shifts
=
&
bitmap
->
color_shifts
;
}
else
{
...
...
@@ -1853,8 +1853,8 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
{
if
(
!
(
bitmap
=
X11DRV_get_phys_bitmap
(
hbitmap
)))
return
ERROR_INVALID_HANDLE
;
physdev
=
NULL
;
depth
=
bitmap
->
pixmap_
depth
;
color_shifts
=
&
bitmap
->
pixmap_
color_shifts
;
depth
=
bitmap
->
depth
;
color_shifts
=
&
bitmap
->
color_shifts
;
}
else
{
...
...
dlls/winex11.drv/bitmap.c
View file @
46f1d2a4
...
...
@@ -55,7 +55,7 @@ void X11DRV_BITMAP_Init(void)
wine_tsx11_lock
();
bitmap_context
=
XUniqueContext
();
BITMAP_stock_phys_bitmap
.
pixmap_
depth
=
1
;
BITMAP_stock_phys_bitmap
.
depth
=
1
;
BITMAP_stock_phys_bitmap
.
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
1
,
1
,
1
);
bitmap_gc
[
0
]
=
XCreateGC
(
gdi_display
,
BITMAP_stock_phys_bitmap
.
pixmap
,
0
,
NULL
);
XSetGraphicsExposures
(
gdi_display
,
bitmap_gc
[
0
],
False
);
...
...
@@ -100,15 +100,15 @@ HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
physDev
->
bitmap
=
physBitmap
;
physDev
->
drawable
=
physBitmap
->
pixmap
;
physDev
->
color_shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
pixmap_
color_shifts
:
NULL
;
physDev
->
color_shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
color_shifts
:
NULL
;
SetRect
(
&
physDev
->
drawable_rect
,
0
,
0
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
);
physDev
->
dc_rect
=
physDev
->
drawable_rect
;
/* Change GC depth if needed */
if
(
physDev
->
depth
!=
physBitmap
->
pixmap_
depth
)
if
(
physDev
->
depth
!=
physBitmap
->
depth
)
{
physDev
->
depth
=
physBitmap
->
pixmap_
depth
;
physDev
->
depth
=
physBitmap
->
depth
;
wine_tsx11_lock
();
XFreeGC
(
gdi_display
,
physDev
->
gc
);
physDev
->
gc
=
XCreateGC
(
gdi_display
,
physDev
->
drawable
,
0
,
NULL
);
...
...
@@ -132,13 +132,13 @@ BOOL X11DRV_create_phys_bitmap( HBITMAP hbitmap, const BITMAP *bitmap, int depth
if
(
!
(
physBitmap
=
X11DRV_init_phys_bitmap
(
hbitmap
)))
return
FALSE
;
physBitmap
->
pixmap_
depth
=
depth
;
physBitmap
->
depth
=
depth
;
physBitmap
->
trueColor
=
true_color
;
if
(
true_color
)
physBitmap
->
pixmap_
color_shifts
=
*
shifts
;
if
(
true_color
)
physBitmap
->
color_shifts
=
*
shifts
;
wine_tsx11_lock
();
physBitmap
->
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
bitmap
->
bmWidth
,
bitmap
->
bmHeight
,
physBitmap
->
pixmap_
depth
);
bitmap
->
bmWidth
,
bitmap
->
bmHeight
,
physBitmap
->
depth
);
if
(
physBitmap
->
pixmap
)
{
GC
gc
=
get_bitmap_gc
(
depth
);
...
...
dlls/winex11.drv/brush.c
View file @
46f1d2a4
...
...
@@ -218,7 +218,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
X11DRV_DIB_Lock
(
physBitmap
,
DIB_Status_GdiMod
);
if
((
physDev
->
depth
==
1
)
&&
(
physBitmap
->
pixmap_
depth
!=
1
))
if
((
physDev
->
depth
==
1
)
&&
(
physBitmap
->
depth
!=
1
))
{
wine_tsx11_lock
();
/* Special case: a color pattern on a monochrome DC */
...
...
@@ -237,7 +237,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
X11DRV_DIB_Unlock
(
physBitmap
,
TRUE
);
if
(
physBitmap
->
pixmap_
depth
>
1
)
if
(
physBitmap
->
depth
>
1
)
{
physDev
->
brush
.
fillStyle
=
FillTiled
;
physDev
->
brush
.
pixel
=
0
;
/* Ignored */
...
...
dlls/winex11.drv/dib.c
View file @
46f1d2a4
...
...
@@ -3451,8 +3451,8 @@ static void X11DRV_DIB_DoCopyDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB,
descr
.
colorMap
=
colorMap
;
descr
.
nColorMap
=
nColorMap
;
descr
.
bits
=
dibSection
.
dsBm
.
bmBits
;
descr
.
depth
=
physBitmap
->
pixmap_
depth
;
descr
.
shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
pixmap_
color_shifts
:
NULL
;
descr
.
depth
=
physBitmap
->
depth
;
descr
.
shifts
=
physBitmap
->
trueColor
?
&
physBitmap
->
color_shifts
:
NULL
;
descr
.
compression
=
dibSection
.
dsBmih
.
biCompression
;
descr
.
physBitmap
=
physBitmap
;
...
...
@@ -3523,7 +3523,7 @@ static void X11DRV_DIB_DoUpdateDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB)
GetObjectW
(
physBitmap
->
hbitmap
,
sizeof
(
bitmap
),
&
bitmap
);
X11DRV_DIB_DoCopyDIBSection
(
physBitmap
,
toDIB
,
physBitmap
->
colorMap
,
physBitmap
->
nColorMap
,
physBitmap
->
pixmap
,
get_bitmap_gc
(
physBitmap
->
pixmap_
depth
),
physBitmap
->
pixmap
,
get_bitmap_gc
(
physBitmap
->
depth
),
0
,
0
,
0
,
0
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
);
}
...
...
@@ -3893,13 +3893,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
{
if
(
dib
.
dsBm
.
bmBitsPixel
==
1
)
{
physBitmap
->
pixmap_
depth
=
1
;
physBitmap
->
depth
=
1
;
physBitmap
->
trueColor
=
FALSE
;
}
else
{
physBitmap
->
pixmap_
depth
=
screen_depth
;
physBitmap
->
pixmap_
color_shifts
=
X11DRV_PALETTE_default_shifts
;
physBitmap
->
depth
=
screen_depth
;
physBitmap
->
color_shifts
=
X11DRV_PALETTE_default_shifts
;
physBitmap
->
trueColor
=
(
visual
->
class
==
TrueColor
||
visual
->
class
==
DirectColor
);
}
}
...
...
@@ -3911,7 +3911,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
if
(
X11DRV_DIB_QueryXShm
(
&
pixmaps
)
&&
(
physBitmap
->
image
=
X11DRV_XShmCreateImage
(
dib
.
dsBm
.
bmWidth
,
dib
.
dsBm
.
bmHeight
,
physBitmap
->
pixmap_
depth
,
&
physBitmap
->
shminfo
)))
physBitmap
->
depth
,
&
physBitmap
->
shminfo
)))
{
if
(
pixmaps
)
{
...
...
@@ -3930,7 +3930,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
{
physBitmap
->
shm_mode
=
X11DRV_SHM_NONE
;
physBitmap
->
image
=
X11DRV_DIB_CreateXImage
(
dib
.
dsBm
.
bmWidth
,
dib
.
dsBm
.
bmHeight
,
physBitmap
->
pixmap_
depth
);
physBitmap
->
depth
);
}
#ifdef HAVE_LIBXXSHM
...
...
@@ -3940,13 +3940,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
physBitmap
->
pixmap
=
XShmCreatePixmap
(
gdi_display
,
root_window
,
physBitmap
->
shminfo
.
shmaddr
,
&
physBitmap
->
shminfo
,
dib
.
dsBm
.
bmWidth
,
dib
.
dsBm
.
bmHeight
,
physBitmap
->
pixmap_
depth
);
physBitmap
->
depth
);
}
else
#endif
{
physBitmap
->
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
dib
.
dsBm
.
bmWidth
,
dib
.
dsBm
.
bmHeight
,
physBitmap
->
pixmap_
depth
);
dib
.
dsBm
.
bmHeight
,
physBitmap
->
depth
);
}
wine_tsx11_unlock
();
...
...
@@ -3954,7 +3954,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
if
(
physBitmap
->
trueColor
)
{
ColorShifts
*
shifts
=
&
physBitmap
->
pixmap_
color_shifts
;
ColorShifts
*
shifts
=
&
physBitmap
->
color_shifts
;
/* When XRender is around and used, we also support dibsections in other formats like 16-bit. In these
* cases we need to override the mask of XImages. The reason is that during XImage creation the masks are
...
...
dlls/winex11.drv/opengl.c
View file @
46f1d2a4
...
...
@@ -1185,7 +1185,7 @@ static XID create_bitmap_glxpixmap(X11DRV_PDEVICE *physDev, WineGLPixelFormat *f
vis
=
pglXGetVisualFromFBConfig
(
gdi_display
,
fmt
->
fbconfig
);
if
(
vis
)
{
if
(
vis
->
depth
==
physDev
->
bitmap
->
pixmap_
depth
)
if
(
vis
->
depth
==
physDev
->
bitmap
->
depth
)
ret
=
pglXCreateGLXPixmap
(
gdi_display
,
vis
,
physDev
->
bitmap
->
pixmap
);
XFree
(
vis
);
}
...
...
dlls/winex11.drv/x11drv.h
View file @
46f1d2a4
...
...
@@ -118,8 +118,8 @@ typedef struct
HBITMAP
hbitmap
;
Pixmap
pixmap
;
XID
glxpixmap
;
int
pixmap_depth
;
ColorShifts
pixmap_color_shifts
;
int
depth
;
/* depth of the X pixmap */
ColorShifts
color_shifts
;
/* color shifts of the X pixmap */
/* the following fields are only used for DIB section bitmaps */
int
status
,
p_status
;
/* mapping status */
XImage
*
image
;
/* cached XImage */
...
...
dlls/winex11.drv/xrender.c
View file @
46f1d2a4
...
...
@@ -1345,9 +1345,9 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel,
return
FALSE
;
}
physBitmap
->
pixmap_
depth
=
pict_format
->
depth
;
physBitmap
->
depth
=
pict_format
->
depth
;
physBitmap
->
trueColor
=
TRUE
;
physBitmap
->
pixmap_
color_shifts
=
shifts
;
physBitmap
->
color_shifts
=
shifts
;
return
TRUE
;
}
...
...
@@ -2694,8 +2694,7 @@ static DWORD xrenderdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMA
{
if
(
!
(
bitmap
=
X11DRV_get_phys_bitmap
(
hbitmap
)))
return
ERROR_INVALID_HANDLE
;
physdev
=
NULL
;
dst_format
=
get_xrender_format_from_color_shifts
(
bitmap
->
pixmap_depth
,
&
bitmap
->
pixmap_color_shifts
);
dst_format
=
get_xrender_format_from_color_shifts
(
bitmap
->
depth
,
&
bitmap
->
color_shifts
);
}
else
{
...
...
@@ -2980,19 +2979,19 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
void
X11DRV_XRender_CopyBrush
(
X11DRV_PDEVICE
*
physDev
,
X_PHYSBITMAP
*
physBitmap
,
int
width
,
int
height
)
{
/* At depths >1, the depth of physBitmap and physDev might not be the same e.g. the physbitmap might be a 16-bit DIB while the physdev uses 24-bit */
int
depth
=
physBitmap
->
pixmap_
depth
==
1
?
1
:
physDev
->
depth
;
enum
wxr_format
src_format
=
get_xrender_format_from_color_shifts
(
physBitmap
->
pixmap_depth
,
&
physBitmap
->
pixmap_
color_shifts
);
int
depth
=
physBitmap
->
depth
==
1
?
1
:
physDev
->
depth
;
enum
wxr_format
src_format
=
get_xrender_format_from_color_shifts
(
physBitmap
->
depth
,
&
physBitmap
->
color_shifts
);
enum
wxr_format
dst_format
=
get_xrender_format_from_color_shifts
(
physDev
->
depth
,
physDev
->
color_shifts
);
wine_tsx11_lock
();
physDev
->
brush
.
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
width
,
height
,
depth
);
/* Use XCopyArea when the physBitmap and brush.pixmap have the same format. */
if
(
(
physBitmap
->
pixmap_depth
==
1
)
||
(
!
X11DRV_XRender_Installed
&&
physDev
->
depth
==
physBitmap
->
pixmap_
depth
)
||
if
(
(
physBitmap
->
depth
==
1
)
||
(
!
X11DRV_XRender_Installed
&&
physDev
->
depth
==
physBitmap
->
depth
)
||
(
src_format
==
dst_format
)
)
{
XCopyArea
(
gdi_display
,
physBitmap
->
pixmap
,
physDev
->
brush
.
pixmap
,
get_bitmap_gc
(
physBitmap
->
pixmap_
depth
),
0
,
0
,
width
,
height
,
0
,
0
);
get_bitmap_gc
(
physBitmap
->
depth
),
0
,
0
,
width
,
height
,
0
,
0
);
}
else
/* We need depth conversion */
{
...
...
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