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
22fea29c
Unverified
Commit
22fea29c
authored
Dec 19, 2018
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/fb_fastpath' into 3.6.x
Attributes GH PR #753:
https://github.com/ArcticaProject/nx-libs/pull/753
parents
8d6a4a9b
034228d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
22 deletions
+34
-22
fbblt.c
nx-X11/programs/Xserver/fb/fbblt.c
+34
-22
No files found.
nx-X11/programs/Xserver/fb/fbblt.c
View file @
22fea29c
...
...
@@ -67,8 +67,42 @@ fbBlt (FbBits *srcLine,
int
n
,
nmiddle
;
Bool
destInvarient
;
int
startbyte
,
endbyte
;
FbDeclareMergeRop
();
if
(
alu
==
GXcopy
&&
pm
==
FB_ALLONES
&&
!
(
srcX
&
7
)
&&
!
(
dstX
&
7
)
&&
!
(
width
&
7
))
{
CARD8
*
src_byte
=
(
CARD8
*
)
srcLine
+
(
srcX
>>
3
);
CARD8
*
dst_byte
=
(
CARD8
*
)
dstLine
+
(
dstX
>>
3
);
FbStride
src_byte_stride
=
srcStride
<<
(
FB_SHIFT
-
3
);
FbStride
dst_byte_stride
=
dstStride
<<
(
FB_SHIFT
-
3
);
int
width_byte
=
(
width
>>
3
);
/* Make sure there's no overlap; we can't use memcpy in that
* case as it's not well defined, so fall through to the
* general code
*/
if
(
src_byte
+
width_byte
<=
dst_byte
||
dst_byte
+
width_byte
<=
src_byte
)
{
int
i
;
if
(
!
upsidedown
)
for
(
i
=
0
;
i
<
height
;
i
++
)
memcpy
(
dst_byte
+
i
*
dst_byte_stride
,
src_byte
+
i
*
src_byte_stride
,
width_byte
);
else
for
(
i
=
height
-
1
;
i
>=
0
;
i
--
)
memcpy
(
dst_byte
+
i
*
dst_byte_stride
,
src_byte
+
i
*
src_byte_stride
,
width_byte
);
return
;
}
}
#ifdef FB_24BIT
if
(
bpp
==
24
&&
!
FbCheck24Pix
(
pm
))
{
...
...
@@ -78,28 +112,6 @@ fbBlt (FbBits *srcLine,
}
#endif
if
(
alu
==
GXcopy
&&
pm
==
FB_ALLONES
&&
!
reverse
&&
!
(
srcX
&
7
)
&&
!
(
dstX
&
7
)
&&
!
(
width
&
7
))
{
int
i
;
CARD8
*
src
=
(
CARD8
*
)
srcLine
;
CARD8
*
dst
=
(
CARD8
*
)
dstLine
;
srcStride
*=
sizeof
(
FbBits
);
dstStride
*=
sizeof
(
FbBits
);
width
>>=
3
;
src
+=
(
srcX
>>
3
);
dst
+=
(
dstX
>>
3
);
if
(
!
upsidedown
)
for
(
i
=
0
;
i
<
height
;
i
++
)
memcpy
(
dst
+
i
*
dstStride
,
src
+
i
*
srcStride
,
width
);
else
for
(
i
=
height
-
1
;
i
>=
0
;
i
--
)
memcpy
(
dst
+
i
*
dstStride
,
src
+
i
*
srcStride
,
width
);
return
;
}
FbInitializeMergeRop
(
alu
,
pm
);
destInvarient
=
FbDestInvarientMergeRop
();
if
(
upsidedown
)
...
...
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