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
7d8323a4
Commit
7d8323a4
authored
Sep 05, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: simplify nxagentRenderRealizeCursor
also drop unused return code
parent
7ca51c52
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
28 deletions
+16
-28
NXrender.c
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+1
-1
Render.c
nx-X11/programs/Xserver/hw/nxagent/Render.c
+14
-26
Render.h
nx-X11/programs/Xserver/hw/nxagent/Render.h
+1
-1
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
View file @
7d8323a4
...
...
@@ -90,7 +90,7 @@ void miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
extern
int
nxagentCursorSaveRenderInfo
(
ScreenPtr
,
CursorPtr
);
extern
void
nxagentCursorPostSaveRenderInfo
(
CursorPtr
,
ScreenPtr
,
PicturePtr
,
int
,
int
);
extern
int
nxagentRenderRealizeCursor
(
ScreenPtr
,
CursorPtr
);
extern
void
nxagentRenderRealizeCursor
(
ScreenPtr
,
CursorPtr
);
extern
int
nxagentCreatePicture
(
PicturePtr
,
Mask
);
extern
void
nxagentChangePicture
(
PicturePtr
,
Mask
);
extern
int
nxagentChangePictureClip
(
PicturePtr
,
int
,
int
,
xRectangle
*
,
int
,
int
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Render.c
View file @
7d8323a4
...
...
@@ -532,48 +532,36 @@ void nxagentCursorPostSaveRenderInfo(CursorPtr pCursor, ScreenPtr pScreen,
nxagentCursorYOffset
(
pCursor
,
pScreen
)
=
y
;
}
int
nxagentRenderRealizeCursor
(
ScreenPtr
pScreen
,
CursorPtr
pCursor
)
void
nxagentRenderRealizeCursor
(
ScreenPtr
pScreen
,
CursorPtr
pCursor
)
{
int
cid
;
int
x
,
y
;
PicturePtr
pPicture
;
pPicture
=
nxagentCursorPicture
(
pCursor
,
pScreen
);
PicturePtr
pPicture
=
nxagentCursorPicture
(
pCursor
,
pScreen
);
pPicture
->
refcnt
++
;
x
=
nxagentCursorXOffset
(
pCursor
,
pScreen
);
y
=
nxagentCursorYOffset
(
pCursor
,
pScreen
);
/*
* Set the lossless trap so that the image functions
* will not try to encode the image using a lossy
* compression. Drawables should have a quality flag,
* telling if they were originally encoded with a
* lossy algorithm. This would allow us to skip the
* synchronization if the cursor was already encoded
* with the best quality.
*/
int
x
=
nxagentCursorXOffset
(
pCursor
,
pScreen
);
int
y
=
nxagentCursorYOffset
(
pCursor
,
pScreen
);
#ifdef TEST
fprintf
(
stderr
,
"nxagentRenderRealizeCursor: Forcing the synchronization "
"of the cursor.
\n
"
);
fprintf
(
stderr
,
"%s: Forcing the synchronization of the cursor.
\n
"
,
__func__
);
#endif
nxagentMarkCorruptedRegion
(
pPicture
->
pDrawable
,
NULL
);
/*
* Set the lossless trap so that the image functions will not try to
* encode the image using a lossy compression. Drawables should have
* a quality flag, telling if they were originally encoded with a
* lossy algorithm. This would allow us to skip the synchronization
* if the cursor was already encoded with the best quality.
*/
nxagentLosslessTrap
=
1
;
nxagentSynchronizeDrawable
(
pPicture
->
pDrawable
,
DO_WAIT
,
NEVER_BREAK
,
NULL
);
nxagentLosslessTrap
=
0
;
cid
=
XRenderCreateCursor
(
nxagentDisplay
,
nxagentPicture
(
pPicture
),
x
,
y
);
nxagentCursor
(
pCursor
,
pScreen
)
=
cid
;
return
1
;
nxagentCursor
(
pCursor
,
pScreen
)
=
XRenderCreateCursor
(
nxagentDisplay
,
nxagentPicture
(
pPicture
),
x
,
y
);
}
int
nxagentCreatePicture
(
PicturePtr
pPicture
,
Mask
mask
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Render.h
View file @
7d8323a4
...
...
@@ -104,7 +104,7 @@ while (0)
void
nxagentRenderExtensionInit
(
void
);
Bool
nxagentPictureInit
(
ScreenPtr
,
PictFormatPtr
,
int
);
int
nxagentRenderRealizeCursor
(
ScreenPtr
pScreen
,
CursorPtr
pCursor
);
void
nxagentRenderRealizeCursor
(
ScreenPtr
pScreen
,
CursorPtr
pCursor
);
void
nxagentAddGlyphs
(
GlyphSetPtr
glyphSet
,
Glyph
*
gids
,
xGlyphInfo
*
gi
,
int
nglyphs
,
CARD8
*
images
,
int
sizeImages
);
...
...
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