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
673377a7
Commit
673377a7
authored
Mar 21, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Store copies of remap tables in ImageAttributes objects.
parent
8a0b57a9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
imageattributes.c
dlls/gdiplus/imageattributes.c
+22
-1
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
673377a7
...
...
@@ -326,7 +326,7 @@ struct color_matrix{
struct
color_remap_table
{
BOOL
enabled
;
INT
mapsize
;
GDIPCONST
ColorMap
*
colormap
;
ColorMap
*
colormap
;
};
struct
GpImageAttributes
{
...
...
dlls/gdiplus/imageattributes.c
View file @
673377a7
...
...
@@ -62,11 +62,16 @@ GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
GpStatus
WINGDIPAPI
GdipDisposeImageAttributes
(
GpImageAttributes
*
imageattr
)
{
int
i
;
TRACE
(
"(%p)
\n
"
,
imageattr
);
if
(
!
imageattr
)
return
InvalidParameter
;
for
(
i
=
0
;
i
<
ColorAdjustTypeCount
;
i
++
)
GdipFree
(
imageattr
->
colorremaptables
[
i
].
colormap
);
GdipFree
(
imageattr
);
return
Ok
;
...
...
@@ -205,6 +210,8 @@ GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAtt
ColorAdjustType
type
,
BOOL
enableFlag
,
UINT
mapSize
,
GDIPCONST
ColorMap
*
map
)
{
ColorMap
*
new_map
;
TRACE
(
"(%p,%u,%i,%u,%p)
\n
"
,
imageAttr
,
type
,
enableFlag
,
mapSize
,
map
);
if
(
!
imageAttr
||
type
>=
ColorAdjustTypeCount
)
...
...
@@ -215,8 +222,22 @@ GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAtt
if
(
!
map
||
!
mapSize
)
return
InvalidParameter
;
new_map
=
GdipAlloc
(
sizeof
(
*
map
)
*
mapSize
);
if
(
!
new_map
)
return
OutOfMemory
;
memcpy
(
new_map
,
map
,
sizeof
(
*
map
)
*
mapSize
);
GdipFree
(
imageAttr
->
colorremaptables
[
type
].
colormap
);
imageAttr
->
colorremaptables
[
type
].
mapsize
=
mapSize
;
imageAttr
->
colorremaptables
[
type
].
colormap
=
map
;
imageAttr
->
colorremaptables
[
type
].
colormap
=
new_map
;
}
else
{
GdipFree
(
imageAttr
->
colorremaptables
[
type
].
colormap
);
imageAttr
->
colorremaptables
[
type
].
colormap
=
NULL
;
}
imageAttr
->
colorremaptables
[
type
].
enabled
=
enableFlag
;
...
...
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