[PATCH 3/4] gdiplus: Update bitmap state in GdipUnlockBitmapBits.
Nathan Beckmann
nathan.beckmann at gmail.com
Fri Mar 7 03:19:04 CST 2008
The lockmode field was not being updated for writes, which disallowed
consecutive write locks. Made sure this flag was cleared during
unlock.
Updated tests to reflect new functionality.
---
dlls/gdiplus/image.c | 1 +
dlls/gdiplus/tests/image.c | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 6b827ba..3ffb7c7 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -226,6 +226,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
GdipFree(bitmap->bitmapbits);
bitmap->bitmapbits = NULL;
+ bitmap->lockmode = 0;
return Ok;
}
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 4047fee..d40f6c6 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -237,10 +237,8 @@ static void test_LockBits(void)
}
/* write, consecutive */
- todo_wine {
- stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd);
- expect(Ok, stat);
- }
+ stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd);
+ expect(Ok, stat);
if (stat == Ok) {
stat = GdipBitmapUnlockBits(bm, &bd);
--
1.5.4.2
More information about the wine-patches
mailing list