Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f3824783
Commit
f3824783
authored
Apr 07, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Apr 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a solid_rects primitive.
parent
9a7720fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-0
primitives.c
dlls/gdi32/dibdrv/primitives.c
+32
-0
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
f3824783
...
...
@@ -25,6 +25,7 @@ static inline dibdrv_physdev *get_dibdrv_pdev( PHYSDEV dev )
typedef
struct
primitive_funcs
{
void
(
*
solid_rects
)(
const
dib_info
*
dib
,
int
num
,
RECT
*
rc
,
DWORD
and
,
DWORD
xor
);
DWORD
(
*
colorref_to_pixel
)(
const
dib_info
*
dib
,
COLORREF
color
);
}
primitive_funcs
;
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
f3824783
...
...
@@ -21,6 +21,35 @@
#include "gdi_private.h"
#include "dibdrv.h"
static
inline
DWORD
*
get_pixel_ptr_32
(
const
dib_info
*
dib
,
int
x
,
int
y
)
{
return
(
DWORD
*
)((
BYTE
*
)
dib
->
bits
+
y
*
dib
->
stride
+
x
*
4
);
}
static
inline
void
do_rop_32
(
DWORD
*
ptr
,
DWORD
and
,
DWORD
xor
)
{
*
ptr
=
(
*
ptr
&
and
)
^
xor
;
}
static
void
solid_rects_32
(
const
dib_info
*
dib
,
int
num
,
RECT
*
rc
,
DWORD
and
,
DWORD
xor
)
{
DWORD
*
ptr
,
*
start
;
int
x
,
y
,
i
;
for
(
i
=
0
;
i
<
num
;
i
++
,
rc
++
)
{
start
=
ptr
=
get_pixel_ptr_32
(
dib
,
rc
->
left
,
rc
->
top
);
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
,
start
+=
dib
->
stride
/
4
)
for
(
x
=
rc
->
left
,
ptr
=
start
;
x
<
rc
->
right
;
x
++
)
do_rop_32
(
ptr
++
,
and
,
xor
);
}
}
static
void
solid_rects_null
(
const
dib_info
*
dib
,
int
num
,
RECT
*
rc
,
DWORD
and
,
DWORD
xor
)
{
return
;
}
static
DWORD
colorref_to_pixel_888
(
const
dib_info
*
dib
,
COLORREF
color
)
{
return
(
((
color
>>
16
)
&
0xff
)
|
(
color
&
0xff00
)
|
((
color
<<
16
)
&
0xff0000
)
);
...
...
@@ -58,15 +87,18 @@ static DWORD colorref_to_pixel_null(const dib_info *dib, COLORREF color)
const
primitive_funcs
funcs_8888
=
{
solid_rects_32
,
colorref_to_pixel_888
};
const
primitive_funcs
funcs_32
=
{
solid_rects_32
,
colorref_to_pixel_masks
};
const
primitive_funcs
funcs_null
=
{
solid_rects_null
,
colorref_to_pixel_null
};
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