Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f5d807b7
Commit
f5d807b7
authored
Nov 12, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Get rid of no longer needed path and region fields.
parent
b0da5422
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
43 deletions
+20
-43
gdiplus.c
dlls/gdiplus/gdiplus.c
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+2
-18
region.c
dlls/gdiplus/region.c
+17
-24
No files found.
dlls/gdiplus/gdiplus.c
View file @
f5d807b7
...
...
@@ -459,7 +459,7 @@ void delete_element(region_element* element)
case
RegionDataRect
:
break
;
case
RegionDataPath
:
GdipDeletePath
(
element
->
elementdata
.
path
data
.
path
);
GdipDeletePath
(
element
->
elementdata
.
path
);
break
;
case
RegionDataEmptyRect
:
case
RegionDataInfiniteRect
:
...
...
dlls/gdiplus/gdiplus_private.h
View file @
f5d807b7
...
...
@@ -404,17 +404,7 @@ struct region_element
union
{
GpRectF
rect
;
struct
{
GpPath
*
path
;
struct
{
DWORD
size
;
DWORD
magic
;
DWORD
count
;
DWORD
flags
;
}
pathheader
;
}
pathdata
;
GpPath
*
path
;
struct
{
struct
region_element
*
left
;
/* the original region */
...
...
@@ -424,13 +414,7 @@ struct region_element
};
struct
GpRegion
{
struct
{
DWORD
size
;
DWORD
checksum
;
DWORD
magic
;
DWORD
num_children
;
}
header
;
DWORD
num_children
;
region_element
node
;
};
...
...
dlls/gdiplus/region.c
View file @
f5d807b7
...
...
@@ -123,7 +123,7 @@ static inline INT get_element_size(const region_element* element)
return
needed
+
sizeof
(
GpRect
);
case
RegionDataPath
:
{
const
GpPath
*
path
=
element
->
elementdata
.
path
data
.
path
;
const
GpPath
*
path
=
element
->
elementdata
.
path
;
DWORD
flags
=
is_integer_path
(
path
)
?
FLAGS_INTPATH
:
FLAGS_NOFLAGS
;
/* 3 for headers, once again size doesn't count itself */
needed
+=
sizeof
(
DWORD
)
*
3
;
...
...
@@ -151,11 +151,8 @@ static inline INT get_element_size(const region_element* element)
/* Does not check parameters, caller must do that */
static
inline
GpStatus
init_region
(
GpRegion
*
region
,
const
RegionType
type
)
{
region
->
node
.
type
=
type
;
region
->
header
.
checksum
=
0xdeadbeef
;
region
->
header
.
magic
=
VERSION_MAGIC
;
region
->
header
.
num_children
=
0
;
region
->
header
.
size
=
0
;
region
->
node
.
type
=
type
;
region
->
num_children
=
0
;
return
Ok
;
}
...
...
@@ -183,9 +180,7 @@ static inline GpStatus clone_element(const region_element* element,
case
RegionDataInfiniteRect
:
return
Ok
;
case
RegionDataPath
:
(
*
element2
)
->
elementdata
.
pathdata
.
pathheader
=
element
->
elementdata
.
pathdata
.
pathheader
;
stat
=
GdipClonePath
(
element
->
elementdata
.
pathdata
.
path
,
&
(
*
element2
)
->
elementdata
.
pathdata
.
path
);
stat
=
GdipClonePath
(
element
->
elementdata
.
path
,
&
(
*
element2
)
->
elementdata
.
path
);
if
(
stat
==
Ok
)
return
Ok
;
break
;
default:
...
...
@@ -217,9 +212,7 @@ static inline void fuse_region(GpRegion* region, region_element* left,
region
->
node
.
type
=
mode
;
region
->
node
.
elementdata
.
combine
.
left
=
left
;
region
->
node
.
elementdata
.
combine
.
right
=
right
;
region
->
header
.
size
=
sizeheader_size
+
get_element_size
(
&
region
->
node
);
region
->
header
.
num_children
+=
2
;
region
->
num_children
+=
2
;
}
/*****************************************************************************
...
...
@@ -249,7 +242,7 @@ GpStatus WINGDIPAPI GdipCloneRegion(GpRegion *region, GpRegion **clone)
return
OutOfMemory
;
element
=
&
(
*
clone
)
->
node
;
(
*
clone
)
->
header
=
region
->
header
;
(
*
clone
)
->
num_children
=
region
->
num_children
;
return
clone_element
(
&
region
->
node
,
&
element
);
}
...
...
@@ -406,7 +399,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *region1,
}
fuse_region
(
region1
,
left
,
right
,
mode
);
region1
->
header
.
num_children
+=
region2
->
header
.
num_children
;
region1
->
num_children
+=
region2
->
num_children
;
return
Ok
;
}
...
...
@@ -470,7 +463,7 @@ GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath *path, GpRegion **region)
}
element
=
&
(
*
region
)
->
node
;
stat
=
GdipClonePath
(
path
,
&
element
->
elementdata
.
path
data
.
path
);
stat
=
GdipClonePath
(
path
,
&
element
->
elementdata
.
path
);
if
(
stat
!=
Ok
)
{
GdipDeleteRegion
(
*
region
);
...
...
@@ -741,7 +734,7 @@ static void write_element(const region_element* element, DWORD *buffer,
case
RegionDataPath
:
{
INT
i
;
const
GpPath
*
path
=
element
->
elementdata
.
path
data
.
path
;
const
GpPath
*
path
=
element
->
elementdata
.
path
;
struct
_pathheader
{
DWORD
size
;
...
...
@@ -845,7 +838,7 @@ GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size,
region_header
->
size
=
sizeheader_size
+
get_element_size
(
&
region
->
node
);
region_header
->
checksum
=
0
;
region_header
->
magic
=
VERSION_MAGIC
;
region_header
->
num_children
=
region
->
header
.
num_children
;
region_header
->
num_children
=
region
->
num_children
;
filled
+=
4
;
/* With few exceptions, everything written is DWORD aligned,
* so use that as our base */
...
...
@@ -938,7 +931,7 @@ static GpStatus get_region_hrgn(struct region_element *element, GpGraphics *grap
*
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
return
*
hrgn
?
Ok
:
OutOfMemory
;
case
RegionDataPath
:
return
get_path_hrgn
(
element
->
elementdata
.
path
data
.
path
,
graphics
,
hrgn
);
return
get_path_hrgn
(
element
->
elementdata
.
path
,
graphics
,
hrgn
);
case
RegionDataRect
:
{
GpPath
*
path
;
...
...
@@ -1298,12 +1291,12 @@ static GpStatus transform_region_element(region_element* element, GpMatrix *matr
}
/* Fall-through to do the actual conversion. */
case
RegionDataPath
:
if
(
!
element
->
elementdata
.
path
data
.
path
->
pathdata
.
Count
)
if
(
!
element
->
elementdata
.
path
->
pathdata
.
Count
)
return
Ok
;
stat
=
GdipTransformMatrixPoints
(
matrix
,
element
->
elementdata
.
path
data
.
path
->
pathdata
.
Points
,
element
->
elementdata
.
path
data
.
path
->
pathdata
.
Count
);
element
->
elementdata
.
path
->
pathdata
.
Points
,
element
->
elementdata
.
path
->
pathdata
.
Count
);
return
stat
;
default:
stat
=
transform_region_element
(
element
->
elementdata
.
combine
.
left
,
matrix
);
...
...
@@ -1338,9 +1331,9 @@ static void translate_region_element(region_element* element, REAL dx, REAL dy)
element
->
elementdata
.
rect
.
Y
+=
dy
;
return
;
case
RegionDataPath
:
for
(
i
=
0
;
i
<
element
->
elementdata
.
path
data
.
path
->
pathdata
.
Count
;
i
++
){
element
->
elementdata
.
path
data
.
path
->
pathdata
.
Points
[
i
].
X
+=
dx
;
element
->
elementdata
.
path
data
.
path
->
pathdata
.
Points
[
i
].
Y
+=
dy
;
for
(
i
=
0
;
i
<
element
->
elementdata
.
path
->
pathdata
.
Count
;
i
++
){
element
->
elementdata
.
path
->
pathdata
.
Points
[
i
].
X
+=
dx
;
element
->
elementdata
.
path
->
pathdata
.
Points
[
i
].
Y
+=
dy
;
}
return
;
default:
...
...
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