Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
2d700b14
Unverified
Commit
2d700b14
authored
Apr 10, 2017
by
Mihai Moldovan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sunweaver-pr/createpixmap-alloc-hints-abi-change' into 3.6.x
Attributes GH PR #410:
https://github.com/ArcticaProject/nx-libs/pull/410
parents
cc24d8ba
8b5bb2cd
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
109 additions
and
61 deletions
+109
-61
4001_CreatePixmap-AllocationHints.patch
...tras/Mesa.patches/4001_CreatePixmap-AllocationHints.patch
+13
-0
series
nx-X11/extras/Mesa.patches/series
+1
-0
shm.c
nx-X11/programs/Xserver/Xext/shm.c
+3
-2
compalloc.c
nx-X11/programs/Xserver/composite/compalloc.c
+2
-2
midbe.c
nx-X11/programs/Xserver/dbe/midbe.c
+4
-4
dispatch.c
nx-X11/programs/Xserver/dix/dispatch.c
+1
-1
gc.c
nx-X11/programs/Xserver/dix/gc.c
+2
-2
glyphcurs.c
nx-X11/programs/Xserver/dix/glyphcurs.c
+2
-1
pixmap.c
nx-X11/programs/Xserver/dix/pixmap.c
+1
-1
window.c
nx-X11/programs/Xserver/dix/window.c
+1
-1
fb.h
nx-X11/programs/Xserver/fb/fb.h
+3
-2
fb24_32.c
nx-X11/programs/Xserver/fb/fb24_32.c
+1
-1
fboverlay.c
nx-X11/programs/Xserver/fb/fboverlay.c
+1
-1
fbpixmap.c
nx-X11/programs/Xserver/fb/fbpixmap.c
+6
-3
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+1
-1
NXglyph.c
nx-X11/programs/Xserver/hw/nxagent/NXglyph.c
+3
-1
NXglyphcurs.c
nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
+2
-1
NXrender.c
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+2
-1
NXshm.c
nx-X11/programs/Xserver/hw/nxagent/NXshm.c
+4
-3
NXwindow.c
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+1
-1
Pixmap.c
nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+19
-13
Pixmaps.h
nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
+1
-1
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+1
-1
pixmapstr.h
nx-X11/programs/Xserver/include/pixmapstr.h
+1
-0
scrnintstr.h
nx-X11/programs/Xserver/include/scrnintstr.h
+9
-1
miarc.c
nx-X11/programs/Xserver/mi/miarc.c
+2
-1
mibitblt.c
nx-X11/programs/Xserver/mi/mibitblt.c
+4
-2
mibstore.c
nx-X11/programs/Xserver/mi/mibstore.c
+4
-3
midispcur.c
nx-X11/programs/Xserver/mi/midispcur.c
+6
-5
miglblt.c
nx-X11/programs/Xserver/mi/miglblt.c
+2
-1
miscrinit.c
nx-X11/programs/Xserver/mi/miscrinit.c
+1
-1
mirect.c
nx-X11/programs/Xserver/render/mirect.c
+2
-1
mitrap.c
nx-X11/programs/Xserver/render/mitrap.c
+1
-1
render.c
nx-X11/programs/Xserver/render/render.c
+2
-1
No files found.
nx-X11/extras/Mesa.patches/4001_CreatePixmap-AllocationHints.patch
0 → 100644
View file @
2d700b14
Index: Mesa/include/GL/xmesa_xf86.h
===================================================================
--- Mesa.orig/include/GL/xmesa_xf86.h
+++ Mesa/include/GL/xmesa_xf86.h
@@ -130,7 +130,7 @@ do { \
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
- (*__d->CreatePixmap)(__d, __w, __h, __depth)
+ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0)
#define XMesaFreePixmap(__d,__b) \
(*__d->DestroyPixmap)(__b)
nx-X11/extras/Mesa.patches/series
0 → 100644
View file @
2d700b14
4001_CreatePixmap-AllocationHints.patch
nx-X11/programs/Xserver/Xext/shm.c
View file @
2d700b14
...
...
@@ -505,7 +505,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
putGC
=
GetScratchGC
(
depth
,
dst
->
pScreen
);
if
(
!
putGC
)
return
;
pmap
=
(
*
dst
->
pScreen
->
CreatePixmap
)(
dst
->
pScreen
,
sw
,
sh
,
depth
);
pmap
=
(
*
dst
->
pScreen
->
CreatePixmap
)(
dst
->
pScreen
,
sw
,
sh
,
depth
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pmap
)
{
FreeScratchGC
(
putGC
);
...
...
@@ -1051,7 +1052,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
{
register
PixmapPtr
pPixmap
;
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
pScreen
->
rootDepth
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
pScreen
->
rootDepth
,
0
);
if
(
!
pPixmap
)
return
NullPixmap
;
...
...
nx-X11/programs/Xserver/composite/compalloc.c
View file @
2d700b14
...
...
@@ -539,8 +539,8 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
PixmapPtr
pPixmap
;
/* usage_hint unsupported by our old server infrastructure. */
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
pWin
->
drawable
.
depth
/*
,
CREATE_PIXMAP_USAGE_BACKING_PIXMAP
*/
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
pWin
->
drawable
.
depth
,
CREATE_PIXMAP_USAGE_BACKING_PIXMAP
);
if
(
!
pPixmap
)
return
0
;
...
...
nx-X11/programs/Xserver/dbe/midbe.c
View file @
2d700b14
...
...
@@ -188,7 +188,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction)
if
(
!
(
pDbeWindowPrivPriv
->
pFrontBuffer
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
pDbeWindowPriv
->
width
,
pDbeWindowPriv
->
height
,
pWin
->
drawable
.
depth
)))
pWin
->
drawable
.
depth
,
0
)))
{
return
(
BadAlloc
);
}
...
...
@@ -197,7 +197,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction)
if
(
!
(
pDbeWindowPrivPriv
->
pBackBuffer
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
pDbeWindowPriv
->
width
,
pDbeWindowPriv
->
height
,
pWin
->
drawable
.
depth
)))
pWin
->
drawable
.
depth
,
0
)))
{
(
*
pScreen
->
DestroyPixmap
)(
pDbeWindowPrivPriv
->
pFrontBuffer
);
return
(
BadAlloc
);
...
...
@@ -668,10 +668,10 @@ miDbePositionWindow(pWin, x, y)
/* Create DBE buffer pixmaps equal to size of resized window. */
pFrontBuffer
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
width
,
height
,
pWin
->
drawable
.
depth
);
pWin
->
drawable
.
depth
,
0
);
pBackBuffer
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
width
,
height
,
pWin
->
drawable
.
depth
);
pWin
->
drawable
.
depth
,
0
);
if
(
!
pFrontBuffer
||
!
pBackBuffer
)
{
...
...
nx-X11/programs/Xserver/dix/dispatch.c
View file @
2d700b14
...
...
@@ -1508,7 +1508,7 @@ ProcCreatePixmap(register ClientPtr client)
CreatePmap:
pMap
=
(
PixmapPtr
)(
*
pDraw
->
pScreen
->
CreatePixmap
)
(
pDraw
->
pScreen
,
stuff
->
width
,
stuff
->
height
,
stuff
->
depth
);
stuff
->
height
,
stuff
->
depth
,
0
);
if
(
pMap
)
{
pMap
->
drawable
.
serialNumber
=
NEXT_SERIAL_NUMBER
;
...
...
nx-X11/programs/Xserver/dix/gc.c
View file @
2d700b14
...
...
@@ -694,7 +694,7 @@ CreateDefaultTile (GCPtr pGC)
(
*
pGC
->
pScreen
->
QueryBestSize
)(
TileShape
,
&
w
,
&
h
,
pGC
->
pScreen
);
pTile
=
(
PixmapPtr
)
(
*
pGC
->
pScreen
->
CreatePixmap
)(
pGC
->
pScreen
,
w
,
h
,
pGC
->
depth
);
w
,
h
,
pGC
->
depth
,
0
);
pgcScratch
=
GetScratchGC
(
pGC
->
depth
,
pGC
->
pScreen
);
if
(
!
pTile
||
!
pgcScratch
)
{
...
...
@@ -1047,7 +1047,7 @@ CreateDefaultStipple(int screenNum)
h
=
16
;
(
*
pScreen
->
QueryBestSize
)(
StippleShape
,
&
w
,
&
h
,
pScreen
);
if
(
!
(
pScreen
->
PixmapPerDepth
[
0
]
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
w
,
h
,
1
)))
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
w
,
h
,
1
,
0
)))
return
FALSE
;
/* fill stipple with 1 */
tmpval
[
0
]
=
GXcopy
;
tmpval
[
1
]
=
1
;
tmpval
[
2
]
=
FillSolid
;
...
...
nx-X11/programs/Xserver/dix/glyphcurs.c
View file @
2d700b14
...
...
@@ -99,7 +99,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
bzero
(
pbits
,
nby
);
ppix
=
(
PixmapPtr
)(
*
pScreen
->
CreatePixmap
)(
pScreen
,
cm
->
width
,
cm
->
height
,
1
);
cm
->
height
,
1
,
CREATE_PIXMAP_USAGE_SCRATCH
);
pGC
=
GetScratchGC
(
1
,
pScreen
);
if
(
!
ppix
||
!
pGC
)
{
...
...
nx-X11/programs/Xserver/dix/pixmap.c
View file @
2d700b14
...
...
@@ -59,7 +59,7 @@ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth,
pScreen
->
pScratchPixmap
=
NULL
;
else
/* width and height of 0 means don't allocate any pixmap data */
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
depth
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
depth
,
0
);
if
(
pPixmap
)
{
if
((
*
pScreen
->
ModifyPixmapHeader
)(
pPixmap
,
width
,
height
,
depth
,
...
...
nx-X11/programs/Xserver/dix/window.c
View file @
2d700b14
...
...
@@ -295,7 +295,7 @@ MakeRootTile(WindowPtr pWin)
register
int
i
,
j
;
pWin
->
background
.
pixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
4
,
4
,
pScreen
->
rootDepth
);
pScreen
->
rootDepth
,
0
);
pWin
->
backgroundState
=
BackgroundPixmap
;
pGC
=
GetScratchGC
(
pScreen
->
rootDepth
,
pScreen
);
...
...
nx-X11/programs/Xserver/fb/fb.h
View file @
2d700b14
...
...
@@ -1596,10 +1596,11 @@ fbPictureInit (ScreenPtr pScreen,
*/
PixmapPtr
fbCreatePixmapBpp
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
int
bpp
);
fbCreatePixmapBpp
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
int
bpp
,
unsigned
usage_hint
);
PixmapPtr
fbCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
);
fbCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
unsigned
usage_hint
);
Bool
fbDestroyPixmap
(
PixmapPtr
pPixmap
);
...
...
nx-X11/programs/Xserver/fb/fb24_32.c
View file @
2d700b14
...
...
@@ -537,7 +537,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
pOldTile
->
drawable
.
width
,
pOldTile
->
drawable
.
height
,
pOldTile
->
drawable
.
depth
,
bitsPerPixel
);
bitsPerPixel
,
0
);
if
(
!
pNewTile
)
return
0
;
fbGetDrawable
(
&
pOldTile
->
drawable
,
...
...
nx-X11/programs/Xserver/fb/fboverlay.c
View file @
2d700b14
...
...
@@ -140,7 +140,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
pbits
=
pScrPriv
->
layer
[
i
].
u
.
init
.
pbits
;
width
=
pScrPriv
->
layer
[
i
].
u
.
init
.
width
;
depth
=
pScrPriv
->
layer
[
i
].
u
.
init
.
depth
;
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
depth
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
depth
,
0
);
if
(
!
pPixmap
)
return
FALSE
;
if
(
!
(
*
pScreen
->
ModifyPixmapHeader
)(
pPixmap
,
pScreen
->
width
,
...
...
nx-X11/programs/Xserver/fb/fbpixmap.c
View file @
2d700b14
...
...
@@ -31,7 +31,8 @@
#include "fb.h"
PixmapPtr
fbCreatePixmapBpp
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
int
bpp
)
fbCreatePixmapBpp
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
int
bpp
,
unsigned
usage_hint
)
{
PixmapPtr
pPixmap
;
size_t
datasize
;
...
...
@@ -81,12 +82,14 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
pPixmap
->
screen_x
=
0
;
pPixmap
->
screen_y
=
0
;
#endif
pPixmap
->
usage_hint
=
usage_hint
;
return
pPixmap
;
}
PixmapPtr
fbCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
)
fbCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
unsigned
usage_hint
)
{
int
bpp
;
bpp
=
BitsPerPixel
(
depth
);
...
...
@@ -94,7 +97,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth)
if
(
bpp
==
32
&&
depth
<=
24
)
bpp
=
fbGetScreenPrivate
(
pScreen
)
->
pix32bpp
;
#endif
return
fbCreatePixmapBpp
(
pScreen
,
width
,
height
,
depth
,
bpp
);
return
fbCreatePixmapBpp
(
pScreen
,
width
,
height
,
depth
,
bpp
,
usage_hint
);
}
Bool
...
...
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
2d700b14
...
...
@@ -2702,7 +2702,7 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
* would fail.
*/
pBitmap
=
nxagentCreatePixmap
(
pDrawable
->
pScreen
,
pDrawable
->
width
,
pDrawable
->
height
,
pDrawable
->
depth
);
pBitmap
=
nxagentCreatePixmap
(
pDrawable
->
pScreen
,
pDrawable
->
width
,
pDrawable
->
height
,
pDrawable
->
depth
,
0
);
if
(
pBitmap
==
NULL
)
{
...
...
nx-X11/programs/Xserver/hw/nxagent/NXglyph.c
View file @
2d700b14
...
...
@@ -245,7 +245,9 @@ miGlyphs (CARD8 op,
return
;
width
=
extents
.
x2
-
extents
.
x1
;
height
=
extents
.
y2
-
extents
.
y1
;
pMaskPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
maskFormat
->
depth
);
pMaskPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
maskFormat
->
depth
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pMaskPixmap
)
return
;
...
...
nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
View file @
2d700b14
...
...
@@ -114,7 +114,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
/* zeroing the (pad) bits seems to help some ddx cursor handling */
bzero
(
pbits
,
nby
);
ppix
=
fbCreatePixmap
(
pScreen
,
cm
->
width
,
cm
->
height
,
1
);
ppix
=
fbCreatePixmap
(
pScreen
,
cm
->
width
,
cm
->
height
,
1
,
CREATE_PIXMAP_USAGE_SCRATCH
);
pGC
=
GetScratchGC
(
1
,
pScreen
);
if
(
!
ppix
||
!
pGC
)
{
...
...
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
View file @
2d700b14
...
...
@@ -1266,7 +1266,8 @@ ProcRenderCreateCursor (ClientPtr client)
free
(
mskbits
);
return
(
BadImplementation
);
}
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
32
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
32
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
{
free
(
argbbits
);
...
...
nx-X11/programs/Xserver/hw/nxagent/NXshm.c
View file @
2d700b14
...
...
@@ -173,7 +173,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
nxagentShmTrap
=
1
;
return
;
}
pmap
=
(
*
dst
->
pScreen
->
CreatePixmap
)(
dst
->
pScreen
,
sw
,
sh
,
depth
);
pmap
=
(
*
dst
->
pScreen
->
CreatePixmap
)(
dst
->
pScreen
,
sw
,
sh
,
depth
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pmap
)
{
nxagentShmTrap
=
1
;
...
...
@@ -387,7 +388,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
nxagentShmPixmapTrap
=
1
;
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
width
,
height
,
depth
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
width
,
height
,
depth
,
0
);
if
(
!
pPixmap
)
{
...
...
@@ -397,7 +398,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
}
#ifdef TEST
fprintf
(
stderr
,
"fbShmCreatePixmap: Width [%d] Height [%d] Depth [%d]
\n
"
,
width
,
height
,
depth
);
fprintf
(
stderr
,
"fbShmCreatePixmap: Width [%d] Height [%d] Depth [%d]
Hint[%d]
\n
"
,
width
,
height
,
depth
,
0
);
#endif
if
(
!
(
*
pScreen
->
ModifyPixmapHeader
)(
pPixmap
,
width
,
height
,
depth
,
...
...
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
View file @
2d700b14
...
...
@@ -162,7 +162,7 @@ MakeRootTile(WindowPtr pWin)
register
int
i
,
j
;
pWin
->
background
.
pixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
4
,
4
,
pScreen
->
rootDepth
);
pScreen
->
rootDepth
,
0
);
pWin
->
backgroundState
=
BackgroundPixmap
;
pGC
=
GetScratchGC
(
pScreen
->
rootDepth
,
pScreen
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
View file @
2d700b14
...
...
@@ -96,8 +96,8 @@ struct nxagentPixmapPair
PixmapPtr
pMap
;
};
PixmapPtr
nxagentCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
)
PixmapPtr
nxagentCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
,
unsigned
usage_hint
)
{
nxagentPrivPixmapPtr
pPixmapPriv
,
pVirtualPriv
;
...
...
@@ -106,7 +106,8 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
#ifdef DEBUG
fprintf
(
stderr
,
"nxagentCreatePixmap: Creating pixmap with width [%d] "
"height [%d] depth [%d].
\n
"
,
width
,
height
,
depth
);
"height [%d] depth [%d] and allocation hint [%d].
\n
"
,
width
,
height
,
depth
,
usage_hint
);
#endif
/*
...
...
@@ -120,7 +121,8 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentCreatePixmap: WARNING! Failed to create pixmap with "
"width [%d] height [%d] depth [%d].
\n
"
,
width
,
height
,
depth
);
"width [%d] height [%d] depth [%d] and allocation hint [%d].
\n
"
,
width
,
height
,
depth
,
usage_hint
);
#endif
return
NullPixmap
;
...
...
@@ -144,6 +146,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
pPixmap
->
devKind
=
0
;
pPixmap
->
refcnt
=
1
;
pPixmap
->
devPrivate
.
ptr
=
NULL
;
pPixmap
->
usage_hint
=
usage_hint
;
/*
* Initialize the privates of the real picture.
...
...
@@ -242,13 +245,14 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
* Create the pixmap in the virtual framebuffer.
*/
pVirtual
=
fbCreatePixmap
(
pScreen
,
width
,
height
,
depth
);
pVirtual
=
fbCreatePixmap
(
pScreen
,
width
,
height
,
depth
,
usage_hint
);
if
(
pVirtual
==
NULL
)
{
#ifdef PANIC
fprintf
(
stderr
,
"nxagentCreatePixmap: PANIC! Failed to create virtual pixmap with "
"width [%d] height [%d] depth [%d].
\n
"
,
width
,
height
,
depth
);
"width [%d] height [%d] depth [%d] and allocation hint [%d].
\n
"
,
width
,
height
,
depth
,
usage_hint
);
#endif
nxagentDestroyPixmap
(
pPixmap
);
...
...
@@ -257,8 +261,9 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
}
#ifdef TEST
fprintf
(
stderr
,
"nxagentCreatePixmap: Allocated memory for the Virtual %sPixmap %p of real Pixmap %p (%dx%d)
\n
"
,
nxagentShmPixmapTrap
?
"Shm "
:
""
,
(
void
*
)
pVirtual
,
(
void
*
)
pPixmap
,
width
,
height
);
fprintf
(
stderr
,
"nxagentCreatePixmap: Allocated memory for the Virtual %sPixmap %p of real Pixmap %p (%dx%d),"
,
"allocation hint [%d].
\n
"
,
nxagentShmPixmapTrap
?
"Shm "
:
""
,
(
void
*
)
pVirtual
,
(
void
*
)
pPixmap
,
width
,
height
,
usage_hint
);
#endif
pPixmapPriv
->
pVirtualPixmap
=
pVirtual
;
...
...
@@ -330,10 +335,11 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
"bits per pixel.
\n
"
,
(
void
*
)
pVirtual
);
fprintf
(
stderr
,
"nxagentCreatePixmap: WARNING! Real pixmap created with width [%d] "
"height [%d] depth [%d] bits per pixel [%d].
\n
"
,
pPixmap
->
drawable
.
width
,
"height [%d] depth [%d] bits per pixel [%d] and allocation hint [%d].
\n
"
,
pPixmap
->
drawable
.
width
,
pPixmap
->
drawable
.
height
=
height
,
pPixmap
->
drawable
.
depth
,
pPixmap
->
drawable
.
bitsPerPixel
);
pPixmap
->
drawable
.
bitsPerPixel
,
usage_hint
);
#endif
if
(
!
nxagentRenderTrap
)
...
...
@@ -352,8 +358,8 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
#ifdef TEST
fprintf
(
stderr
,
"nxagentCreatePixmap: Created pixmap at [%p] virtual at [%p] with width [%d] "
"height [%d] depth [%d]
.
\n
"
,
(
void
*
)
pPixmap
,
(
void
*
)
pVirtual
,
width
,
height
,
depth
);
"height [%d] depth [%d]
and allocation hint [%d].
\n
"
,
(
void
*
)
pPixmap
,
(
void
*
)
pVirtual
,
width
,
height
,
depth
,
usage_hint
);
#endif
return
pPixmap
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
View file @
2d700b14
...
...
@@ -117,7 +117,7 @@ extern int nxagentPixmapPrivateIndex;
PixmapPtr
nxagentPixmapPtr
(
Pixmap
pixmap
);
PixmapPtr
nxagentCreatePixmap
(
ScreenPtr
pScreen
,
int
width
,
int
height
,
int
depth
);
int
height
,
int
depth
,
unsigned
usage_hint
);
Bool
nxagentDestroyPixmap
(
PixmapPtr
pPixmap
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
2d700b14
...
...
@@ -2855,7 +2855,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width,
DeleteWindow
(
nxagentShadowWindowPtr
,
accessWindowID
);
}
nxagentShadowPixmapPtr
=
nxagentCreatePixmap
(
pScreen
,
nxagentShadowWidth
,
nxagentShadowHeight
,
nxagentShadowDepth
);
nxagentShadowPixmapPtr
=
nxagentCreatePixmap
(
pScreen
,
nxagentShadowWidth
,
nxagentShadowHeight
,
nxagentShadowDepth
,
0
);
if
(
nxagentShadowPixmapPtr
)
{
...
...
nx-X11/programs/Xserver/include/pixmapstr.h
View file @
2d700b14
...
...
@@ -82,6 +82,7 @@ typedef struct _Pixmap {
short
screen_x
;
short
screen_y
;
#endif
unsigned
usage_hint
;
/* see CREATE_PIXMAP_USAGE_* */
}
PixmapRec
;
#endif
/* PIXMAPSTRUCT_H */
nx-X11/programs/Xserver/include/scrnintstr.h
View file @
2d700b14
...
...
@@ -196,11 +196,19 @@ typedef void (* ClipNotifyProcPtr)(
int
/*dx*/
,
int
/*dy*/
);
/* pixmap will exist only for the duration of the current rendering operation */
#define CREATE_PIXMAP_USAGE_SCRATCH 1
/* pixmap will be the backing pixmap for a redirected window */
#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
/* pixmap will contain a glyph */
#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
typedef
PixmapPtr
(
*
CreatePixmapProcPtr
)(
ScreenPtr
/*pScreen*/
,
int
/*width*/
,
int
/*height*/
,
int
/*depth*/
);
int
/*depth*/
,
unsigned
/*usage_hint*/
);
typedef
Bool
(
*
DestroyPixmapProcPtr
)(
PixmapPtr
/*pPixmap*/
);
...
...
nx-X11/programs/Xserver/mi/miarc.c
View file @
2d700b14
...
...
@@ -1184,7 +1184,8 @@ miPolyArc(pDraw, pGC, narcs, parcs)
/* allocate a 1 bit deep pixmap of the appropriate size, and
* validate it */
pDrawTo
=
(
DrawablePtr
)(
*
pDraw
->
pScreen
->
CreatePixmap
)
(
pDraw
->
pScreen
,
pixmapWidth
,
pixmapHeight
,
1
);
(
pDraw
->
pScreen
,
pixmapWidth
,
pixmapHeight
,
1
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pDrawTo
)
{
FreeScratchGC
(
pGCTo
);
...
...
nx-X11/programs/Xserver/mi/mibitblt.c
View file @
2d700b14
...
...
@@ -420,7 +420,8 @@ miOpqStipDrawable(pDraw, pGC, prgnSrc, pbits, srcx, w, h, dstx, dsty)
RegionPtr
prgnSrcClip
;
pPixmap
=
(
*
pDraw
->
pScreen
->
CreatePixmap
)
(
pDraw
->
pScreen
,
w
+
srcx
,
h
,
1
);
(
pDraw
->
pScreen
,
w
+
srcx
,
h
,
1
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
return
;
...
...
@@ -671,7 +672,8 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
if
(
!
pGC
)
return
;
pPixmap
=
(
*
pDraw
->
pScreen
->
CreatePixmap
)
(
pDraw
->
pScreen
,
w
,
1
,
depth
);
(
pDraw
->
pScreen
,
w
,
1
,
depth
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
{
FreeScratchGC
(
pGC
);
...
...
nx-X11/programs/Xserver/mi/mibstore.c
View file @
2d700b14
...
...
@@ -493,7 +493,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
XID
subWindowMode
=
IncludeInferiors
;
int
x
,
y
;
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
depth
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
depth
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
goto
punt
;
pGC
=
GetScratchGC
(
depth
,
pScreen
);
...
...
@@ -2737,7 +2738,7 @@ miResizeBackingStore(
pNewPixmap
=
(
PixmapPtr
)(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
nw
,
nh
,
pWin
->
drawable
.
depth
);
pWin
->
drawable
.
depth
,
0
);
if
(
!
pNewPixmap
)
{
#ifdef BSEAGER
...
...
@@ -3737,7 +3738,7 @@ miCreateBSPixmap (pWin, pExtents)
(
pScreen
,
extents
->
x2
-
extents
->
x1
,
extents
->
y2
-
extents
->
y1
,
pWin
->
drawable
.
depth
);
pWin
->
drawable
.
depth
,
0
);
}
if
(
!
pBackingStore
->
pBackingPixmap
)
{
...
...
nx-X11/programs/Xserver/mi/midispcur.c
View file @
2d700b14
...
...
@@ -266,7 +266,8 @@ miDCRealize (
pPriv
->
sourceBits
=
0
;
pPriv
->
maskBits
=
0
;
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
pCursor
->
bits
->
width
,
pCursor
->
bits
->
height
,
32
);
pCursor
->
bits
->
height
,
32
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
{
free
((
void
*
)
pPriv
);
...
...
@@ -298,13 +299,13 @@ miDCRealize (
}
pPriv
->
pPicture
=
0
;
#endif
pPriv
->
sourceBits
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
pCursor
->
bits
->
width
,
pCursor
->
bits
->
height
,
1
);
pPriv
->
sourceBits
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
pCursor
->
bits
->
width
,
pCursor
->
bits
->
height
,
1
,
0
);
if
(
!
pPriv
->
sourceBits
)
{
free
((
void
*
)
pPriv
);
return
(
miDCCursorPtr
)
NULL
;
}
pPriv
->
maskBits
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
pCursor
->
bits
->
width
,
pCursor
->
bits
->
height
,
1
);
pPriv
->
maskBits
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
pCursor
->
bits
->
width
,
pCursor
->
bits
->
height
,
1
,
0
);
if
(
!
pPriv
->
maskBits
)
{
(
*
pScreen
->
DestroyPixmap
)
(
pPriv
->
sourceBits
);
...
...
@@ -525,7 +526,7 @@ miDCSaveUnderCursor (pScreen, x, y, w, h)
if
(
pSave
)
(
*
pScreen
->
DestroyPixmap
)
(
pSave
);
pScreenPriv
->
pSave
=
pSave
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
pScreen
->
rootDepth
);
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
pScreen
->
rootDepth
,
0
);
if
(
!
pSave
)
return
FALSE
;
}
...
...
@@ -735,7 +736,7 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask)
}
#endif
pScreenPriv
->
pTemp
=
pTemp
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
pScreenPriv
->
pSave
->
drawable
.
depth
);
(
pScreen
,
w
,
h
,
pScreenPriv
->
pSave
->
drawable
.
depth
,
0
);
if
(
!
pTemp
)
return
FALSE
;
}
...
...
nx-X11/programs/Xserver/mi/miglblt.c
View file @
2d700b14
...
...
@@ -125,7 +125,8 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
FONTMAXBOUNDS
(
pfont
,
descent
);
pPixmap
=
(
*
pDrawable
->
pScreen
->
CreatePixmap
)(
pDrawable
->
pScreen
,
width
,
height
,
1
);
width
,
height
,
1
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
return
;
...
...
nx-X11/programs/Xserver/mi/miscrinit.c
View file @
2d700b14
...
...
@@ -160,7 +160,7 @@ miCreateScreenResources(pScreen)
/* create a pixmap with no data, then redirect it to point to
* the screen
*/
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
pScreen
->
rootDepth
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)(
pScreen
,
0
,
0
,
pScreen
->
rootDepth
,
0
);
if
(
!
pPixmap
)
return
FALSE
;
...
...
nx-X11/programs/Xserver/render/mirect.c
View file @
2d700b14
...
...
@@ -137,7 +137,8 @@ miCompositeRects (CARD8 op,
goto
bail1
;
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
1
,
1
,
rgbaFormat
->
depth
);
rgbaFormat
->
depth
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
goto
bail2
;
...
...
nx-X11/programs/Xserver/render/mitrap.c
View file @
2d700b14
...
...
@@ -62,7 +62,7 @@ miCreateAlphaPicture (ScreenPtr pScreen,
}
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
pPictFormat
->
depth
);
pPictFormat
->
depth
,
0
);
if
(
!
pPixmap
)
return
0
;
pGC
=
GetScratchGC
(
pPixmap
->
drawable
.
depth
,
pScreen
);
...
...
nx-X11/programs/Xserver/render/render.c
View file @
2d700b14
...
...
@@ -1570,7 +1570,8 @@ ProcRenderCreateCursor (ClientPtr client)
free
(
mskbits
);
return
(
BadImplementation
);
}
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
32
);
pPixmap
=
(
*
pScreen
->
CreatePixmap
)
(
pScreen
,
width
,
height
,
32
,
CREATE_PIXMAP_USAGE_SCRATCH
);
if
(
!
pPixmap
)
{
free
(
argbbits
);
...
...
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