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
d357392b
Commit
d357392b
authored
Dec 12, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Remove support for private color maps.
parent
30467685
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
34 deletions
+8
-34
dc.c
dlls/gdi32/dibdrv/dc.c
+5
-28
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+2
-5
primitives.c
dlls/gdi32/dibdrv/primitives.c
+1
-1
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
d357392b
...
...
@@ -68,7 +68,7 @@ static void init_bit_fields(dib_info *dib, const DWORD *bit_fields)
}
static
BOOL
init_dib_info
(
dib_info
*
dib
,
const
BITMAPINFOHEADER
*
bi
,
const
DWORD
*
bit_fields
,
RGBQUAD
*
color_table
,
void
*
bits
,
enum
dib_info_flags
flags
)
const
RGBQUAD
*
color_table
,
void
*
bits
,
enum
dib_info_flags
flags
)
{
dib
->
bit_count
=
bi
->
biBitCount
;
dib
->
width
=
bi
->
biWidth
;
...
...
@@ -79,7 +79,6 @@ static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD
dib
->
bits
.
is_copy
=
FALSE
;
dib
->
bits
.
free
=
NULL
;
dib
->
bits
.
param
=
NULL
;
dib
->
flags
=
flags
;
if
(
dib
->
height
<
0
)
/* top-down */
{
...
...
@@ -143,19 +142,12 @@ static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD
if
(
color_table
&&
bi
->
biClrUsed
)
{
if
(
flags
&
private_color_table
)
{
dib
->
color_table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
bi
->
biClrUsed
*
sizeof
(
dib
->
color_table
[
0
]));
if
(
!
dib
->
color_table
)
return
FALSE
;
memcpy
(
dib
->
color_table
,
color_table
,
bi
->
biClrUsed
*
sizeof
(
color_table
[
0
]));
}
else
dib
->
color_table
=
color_table
;
dib
->
color_table
=
color_table
;
dib
->
color_table_size
=
bi
->
biClrUsed
;
}
else
if
(
flags
&
default_color_table
)
{
dib
->
color_table
=
(
RGBQUAD
*
)
get_default_color_table
(
dib
->
bit_count
);
dib
->
color_table
=
get_default_color_table
(
dib
->
bit_count
);
dib
->
color_table_size
=
dib
->
color_table
?
(
1
<<
dib
->
bit_count
)
:
0
;
}
else
...
...
@@ -170,7 +162,7 @@ static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD
BOOL
init_dib_info_from_bitmapinfo
(
dib_info
*
dib
,
const
BITMAPINFO
*
info
,
void
*
bits
,
enum
dib_info_flags
flags
)
{
return
init_dib_info
(
dib
,
&
info
->
bmiHeader
,
(
const
DWORD
*
)
info
->
bmiColors
,
(
RGBQUAD
*
)
info
->
bmiColors
,
bits
,
flags
);
info
->
bmiColors
,
bits
,
flags
);
}
BOOL
init_dib_info_from_bitmapobj
(
dib_info
*
dib
,
BITMAPOBJ
*
bmp
,
enum
dib_info_flags
flags
)
...
...
@@ -208,9 +200,6 @@ static void clear_dib_info(dib_info *dib)
*/
void
free_dib_info
(
dib_info
*
dib
)
{
if
(
dib
->
flags
&
private_color_table
)
HeapFree
(
GetProcessHeap
(),
0
,
dib
->
color_table
);
if
(
dib
->
bits
.
free
)
dib
->
bits
.
free
(
&
dib
->
bits
);
clear_dib_info
(
dib
);
}
...
...
@@ -229,19 +218,7 @@ void copy_dib_color_info(dib_info *dst, const dib_info *src)
dst
->
blue_shift
=
src
->
blue_shift
;
dst
->
funcs
=
src
->
funcs
;
dst
->
color_table_size
=
src
->
color_table_size
;
dst
->
color_table
=
NULL
;
dst
->
flags
=
src
->
flags
;
if
(
dst
->
color_table_size
)
{
int
size
=
dst
->
color_table_size
*
sizeof
(
dst
->
color_table
[
0
]);
if
(
dst
->
flags
&
private_color_table
)
{
dst
->
color_table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
memcpy
(
dst
->
color_table
,
src
->
color_table
,
size
);
}
else
dst
->
color_table
=
src
->
color_table
;
}
dst
->
color_table
=
src
->
color_table
;
}
DWORD
convert_bitmapinfo
(
const
BITMAPINFO
*
src_info
,
void
*
src_bits
,
struct
bitblt_coords
*
src
,
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
d357392b
...
...
@@ -20,8 +20,7 @@
enum
dib_info_flags
{
private_color_table
=
1
,
default_color_table
=
2
default_color_table
=
1
};
typedef
struct
...
...
@@ -35,11 +34,9 @@ typedef struct
int
red_shift
,
green_shift
,
blue_shift
;
int
red_len
,
green_len
,
blue_len
;
RGBQUAD
*
color_table
;
const
RGBQUAD
*
color_table
;
DWORD
color_table_size
;
enum
dib_info_flags
flags
;
const
struct
primitive_funcs
*
funcs
;
}
dib_info
;
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
d357392b
...
...
@@ -1391,7 +1391,7 @@ static DWORD rgb_to_pixel_colortable(const dib_info *dib, BYTE r, BYTE g, BYTE b
for
(
i
=
0
;
i
<
dib
->
color_table_size
;
i
++
)
{
RGBQUAD
*
cur
=
dib
->
color_table
+
i
;
const
RGBQUAD
*
cur
=
dib
->
color_table
+
i
;
diff
=
(
r
-
cur
->
rgbRed
)
*
(
r
-
cur
->
rgbRed
)
+
(
g
-
cur
->
rgbGreen
)
*
(
g
-
cur
->
rgbGreen
)
+
(
b
-
cur
->
rgbBlue
)
*
(
b
-
cur
->
rgbBlue
);
...
...
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