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
c7ea378f
Commit
c7ea378f
authored
Jul 02, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add a test to show that GdipCloneImage is not supposed to increase…
gdiplus: Add a test to show that GdipCloneImage is not supposed to increase refcount of the source image.
parent
4c3cc501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
image.c
dlls/gdiplus/tests/image.c
+18
-2
No files found.
dlls/gdiplus/tests/image.c
View file @
c7ea378f
...
...
@@ -2674,9 +2674,9 @@ static GpImage *load_image(const BYTE *image_data, UINT image_size)
BYTE
*
data
;
HRESULT
hr
;
GpStatus
status
;
GpImage
*
image
=
NULL
;
GpImage
*
image
=
NULL
,
*
clone
;
ImageType
image_type
;
LONG
refcount
;
LONG
refcount
,
old_refcount
;
hmem
=
GlobalAlloc
(
0
,
image_size
);
data
=
GlobalLock
(
hmem
);
...
...
@@ -2696,6 +2696,22 @@ static GpImage *load_image(const BYTE *image_data, UINT image_size)
status
=
GdipGetImageType
(
image
,
&
image_type
);
ok
(
status
==
Ok
,
"GdipGetImageType error %d
\n
"
,
status
);
refcount
=
obj_refcount
(
stream
);
if
(
image_type
==
ImageTypeBitmap
)
ok
(
refcount
>
1
,
"expected stream refcount > 1, got %d
\n
"
,
refcount
);
else
ok
(
refcount
==
1
,
"expected stream refcount 1, got %d
\n
"
,
refcount
);
old_refcount
=
refcount
;
status
=
GdipCloneImage
(
image
,
&
clone
);
ok
(
status
==
Ok
,
"GdipCloneImage error %d
\n
"
,
status
);
refcount
=
obj_refcount
(
stream
);
ok
(
refcount
==
old_refcount
,
"expected stream refcount %d, got %d
\n
"
,
old_refcount
,
refcount
);
status
=
GdipDisposeImage
(
clone
);
ok
(
status
==
Ok
,
"GdipDisposeImage error %d
\n
"
,
status
);
refcount
=
obj_refcount
(
stream
);
ok
(
refcount
==
old_refcount
,
"expected stream refcount %d, got %d
\n
"
,
old_refcount
,
refcount
);
refcount
=
IStream_Release
(
stream
);
if
(
image_type
==
ImageTypeBitmap
)
ok
(
refcount
>=
1
,
"expected stream refcount != 0
\n
"
);
...
...
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