gdiplus: Copy the bits on bitmap unlock if the write flag is set.
The read and write flags are independent, so a read flag being set doesn't imply we can quit early.
This commit is contained in:
parent
d086af1d36
commit
58eb96c9e7
|
@ -1048,7 +1048,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
|
||||||
if(lockeddata->Reserved & ImageLockModeUserInputBuf)
|
if(lockeddata->Reserved & ImageLockModeUserInputBuf)
|
||||||
return NotImplemented;
|
return NotImplemented;
|
||||||
|
|
||||||
if(lockeddata->Reserved & ImageLockModeRead){
|
if(!(lockeddata->Reserved & ImageLockModeWrite)){
|
||||||
if(!(--bitmap->numlocks))
|
if(!(--bitmap->numlocks))
|
||||||
bitmap->lockmode = 0;
|
bitmap->lockmode = 0;
|
||||||
|
|
||||||
|
|
|
@ -657,7 +657,7 @@ static void test_LockBits(void)
|
||||||
|
|
||||||
stat = GdipBitmapGetPixel(bm, 2, 3, &color);
|
stat = GdipBitmapGetPixel(bm, 2, 3, &color);
|
||||||
expect(Ok, stat);
|
expect(Ok, stat);
|
||||||
todo_wine expect(0xffff8800, color);
|
expect(0xffff8800, color);
|
||||||
|
|
||||||
/* write, conversion */
|
/* write, conversion */
|
||||||
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat32bppARGB, &bd);
|
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat32bppARGB, &bd);
|
||||||
|
|
Loading…
Reference in New Issue