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
e61e4719
Commit
e61e4719
authored
Jan 02, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Don't copy extra data from the end of a row.
parent
81edd2ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
main.c
dlls/windowscodecs/main.c
+2
-1
bitmap.c
dlls/windowscodecs/tests/bitmap.c
+1
-4
No files found.
dlls/windowscodecs/main.c
View file @
e61e4719
...
@@ -86,7 +86,8 @@ HRESULT copy_pixels(UINT bpp, const BYTE *srcbuffer,
...
@@ -86,7 +86,8 @@ HRESULT copy_pixels(UINT bpp, const BYTE *srcbuffer,
return
E_INVALIDARG
;
return
E_INVALIDARG
;
/* if the whole bitmap is copied and the buffer format matches then it's a matter of a single memcpy */
/* if the whole bitmap is copied and the buffer format matches then it's a matter of a single memcpy */
if
(
rc
->
X
==
0
&&
rc
->
Y
==
0
&&
rc
->
Width
==
srcwidth
&&
rc
->
Height
==
srcheight
&&
srcstride
==
dststride
)
if
(
rc
->
X
==
0
&&
rc
->
Y
==
0
&&
rc
->
Width
==
srcwidth
&&
rc
->
Height
==
srcheight
&&
srcstride
==
dststride
&&
srcstride
==
bytesperrow
)
{
{
memcpy
(
dstbuffer
,
srcbuffer
,
srcstride
*
srcheight
);
memcpy
(
dstbuffer
,
srcbuffer
,
srcstride
*
srcheight
);
return
S_OK
;
return
S_OK
;
...
...
dlls/windowscodecs/tests/bitmap.c
View file @
e61e4719
...
@@ -489,10 +489,7 @@ static void test_CreateBitmapFromMemory(void)
...
@@ -489,10 +489,7 @@ static void test_CreateBitmapFromMemory(void)
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
13
,
sizeof
(
data
),
data
);
hr
=
IWICBitmap_CopyPixels
(
bitmap
,
NULL
,
13
,
sizeof
(
data
),
data
);
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels error %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IWICBitmap_CopyPixels error %#x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
sizeof
(
data
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
data
);
i
++
)
if
((
i
%
13
)
<
9
)
ok
(
data
[
i
]
==
data3x2
[
i
],
"%u: expected %u, got %u
\n
"
,
i
,
data3x2
[
i
],
data
[
i
]);
ok
(
data
[
i
]
==
data3x2
[
i
],
"%u: expected %u, got %u
\n
"
,
i
,
data3x2
[
i
],
data
[
i
]);
else
todo_wine
ok
(
data
[
i
]
==
data3x2
[
i
],
"%u: expected %u, got %u
\n
"
,
i
,
data3x2
[
i
],
data
[
i
]);
IWICBitmap_Release
(
bitmap
);
IWICBitmap_Release
(
bitmap
);
}
}
...
...
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