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
8b5bb2cd
Commit
8b5bb2cd
authored
Feb 22, 2017
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hw/nxagent/Pixmap.c et al.: Propagate usage_hint through nxagentCreatePixmap, as well.
parent
560c9564
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
17 deletions
+24
-17
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+1
-1
NXglyph.c
nx-X11/programs/Xserver/hw/nxagent/NXglyph.c
+3
-1
Pixmap.c
nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+18
-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
No files found.
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
8b5bb2cd
...
...
@@ -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 @
8b5bb2cd
...
...
@@ -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/Pixmap.c
View file @
8b5bb2cd
...
...
@@ -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
;
...
...
@@ -243,13 +245,14 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
* Create the pixmap in the virtual framebuffer.
*/
pVirtual
=
fbCreatePixmap
(
pScreen
,
width
,
height
,
depth
,
0
);
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
);
...
...
@@ -258,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
;
...
...
@@ -331,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
)
...
...
@@ -353,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 @
8b5bb2cd
...
...
@@ -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 @
8b5bb2cd
...
...
@@ -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
)
{
...
...
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