Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oblomov
gtk
Commits
0e563e00
Commit
0e563e00
authored
Aug 14, 1998
by
Raph Levien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Committing a patch by Ray Lehtiniemi to speed up 565_d by 25%.
parent
0dece0ba
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
25 deletions
+69
-25
ChangeLog
ChangeLog
+5
-0
ChangeLog.pre-2-0
ChangeLog.pre-2-0
+5
-0
ChangeLog.pre-2-10
ChangeLog.pre-2-10
+5
-0
ChangeLog.pre-2-2
ChangeLog.pre-2-2
+5
-0
ChangeLog.pre-2-4
ChangeLog.pre-2-4
+5
-0
ChangeLog.pre-2-6
ChangeLog.pre-2-6
+5
-0
ChangeLog.pre-2-8
ChangeLog.pre-2-8
+5
-0
gdk/gdkrgb.c
gdk/gdkrgb.c
+34
-25
No files found.
ChangeLog
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
ChangeLog.pre-2-0
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
ChangeLog.pre-2-10
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
ChangeLog.pre-2-2
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
ChangeLog.pre-2-4
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
ChangeLog.pre-2-6
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
ChangeLog.pre-2-8
View file @
0e563e00
Thu Aug 13 21:06:00 1998 Raph Levien <raph@gtk.org>
* gdk/gdkrgb.c: committing a patch by Ray Lehtiniemi that
speeds up the 565_d case by about 25% total. Thanks Ray!
Thu Aug 13 16:47:44 1998 Owen Taylor <otaylor@redhat.com>
* Changed GtkSignalFunc back to () from (void). (again!)
...
...
gdk/gdkrgb.c
View file @
0e563e00
...
...
@@ -1367,41 +1367,50 @@ gdk_rgb_convert_565_br (GdkImage *image,
}
}
/* Thanks to Ray Lehtiniemi for a patch that resulted in a ~25% speedup
in this mode. */
static
void
gdk_rgb_convert_565_d
(
GdkImage
*
image
,
gint
x0
,
gint
y0
,
gint
width
,
gint
height
,
guchar
*
buf
,
int
rowstride
,
gint
x_align
,
gint
y_align
,
GdkRgbCmap
*
cmap
)
gint
x0
,
gint
y0
,
gint
width
,
gint
height
,
guchar
*
buf
,
int
rowstride
,
gint
x_align
,
gint
y_align
,
GdkRgbCmap
*
cmap
)
{
int
x
,
y
;
guchar
*
obuf
;
gint
bpl
;
guchar
*
bptr
,
*
bp2
;
guchar
r
,
g
,
b
;
gint
dith
;
gint
r1
,
g1
,
b1
;
guchar
*
dmp
;
guchar
*
bptr
;
width
+=
x_align
;
height
+=
y_align
;
bptr
=
buf
;
bpl
=
image
->
bpl
;
obuf
=
((
guchar
*
)
image
->
mem
)
+
y0
*
bpl
+
x0
*
2
;
for
(
y
=
0
;
y
<
height
;
y
++
)
obuf
=
((
guchar
*
)
image
->
mem
)
+
y0
*
bpl
+
(
x0
-
x_align
)
*
2
;
for
(
y
=
y_align
;
y
<
height
;
y
++
)
{
dmp
=
DM
[(
y_align
+
y
)
&
(
DM_HEIGHT
-
1
)];
bp2
=
bptr
;
for
(
x
=
0
;
x
<
width
;
x
++
)
{
r
=
*
bp2
++
;
g
=
*
bp2
++
;
b
=
*
bp2
++
;
dith
=
dmp
[(
x_align
+
x
)
&
(
DM_WIDTH
-
1
)]
>>
3
;
r1
=
r
+
dith
;
g1
=
g
+
((
7
-
dith
)
>>
1
);
b1
=
b
+
dith
;
((
unsigned
short
*
)
obuf
)[
x
]
=
(((
r1
-
(
r1
>>
5
))
&
0xf8
)
<<
8
)
|
(((
g1
-
(
g1
>>
6
))
&
0xfc
)
<<
3
)
|
(((
b1
-
(
b1
>>
5
))
&
0xf8
)
>>
3
);
}
guchar
*
dmp
=
DM
[
y
&
(
DM_HEIGHT
-
1
)];
guchar
*
bp2
=
bptr
;
for
(
x
=
x_align
;
x
<
width
;
x
++
)
{
gint32
rgb
=
*
bp2
++
<<
20
;
rgb
+=
*
bp2
++
<<
10
;
rgb
+=
*
bp2
++
;
{
gint32
dith
=
dmp
[
x
&
(
DM_WIDTH
-
1
)]
>>
3
;
rgb
+=
((
dith
<<
20
)
|
dith
|
(((
7
-
dith
)
>>
1
)
<<
10
));
}
rgb
+=
0x10040100
-
((
rgb
&
0x1e0001e0
)
>>
5
)
-
((
rgb
&
0x00070000
)
>>
6
);
((
unsigned
short
*
)
obuf
)[
x
]
=
((
rgb
&
0x0f800000
)
>>
12
)
|
((
rgb
&
0x0003f000
)
>>
7
)
|
((
rgb
&
0x000000f8
)
>>
3
);
}
bptr
+=
rowstride
;
obuf
+=
bpl
;
}
...
...
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