Nikolay Sivov : uxtheme: Implement GetBufferedPaintBits().

Alexandre Julliard julliard at winehq.org
Thu Feb 9 15:54:25 CST 2017


Module: wine
Branch: master
Commit: b557cb42eb706a7b6c880112f74a0d8af29d71d9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b557cb42eb706a7b6c880112f74a0d8af29d71d9

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Feb  9 01:42:39 2017 +0300

uxtheme: Implement GetBufferedPaintBits().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/uxtheme/buffer.c       | 19 +++++++++++++++----
 dlls/uxtheme/tests/system.c |  3 +--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/dlls/uxtheme/buffer.c b/dlls/uxtheme/buffer.c
index 853fe82..ce1fc9f 100644
--- a/dlls/uxtheme/buffer.c
+++ b/dlls/uxtheme/buffer.c
@@ -189,11 +189,22 @@ HRESULT WINAPI BufferedPaintSetAlpha(HPAINTBUFFER hBufferedPaint, const RECT *pr
 /***********************************************************************
  *      GetBufferedPaintBits                               (UXTHEME.@)
  */
-HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER hBufferedPaint, RGBQUAD **ppbBuffer,
-                                    int *pcxRow)
+HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER bufferhandle, RGBQUAD **bits, int *width)
 {
-    FIXME("Stub (%p %p %p)\n", hBufferedPaint, ppbBuffer, pcxRow);
-    return E_NOTIMPL;
+    struct paintbuffer *buffer = get_buffer_obj(bufferhandle);
+
+    TRACE("(%p %p %p)\n", buffer, bits, width);
+
+    if (!bits || !width)
+        return E_POINTER;
+
+    if (!buffer || !buffer->bits)
+        return E_FAIL;
+
+    *bits = buffer->bits;
+    *width = buffer->rect.right - buffer->rect.left;
+
+    return S_OK;
 }
 
 /***********************************************************************
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 6c08635..81e47be 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -648,7 +648,6 @@ todo_wine
         bits = NULL;
         row = 0;
         hr = pGetBufferedPaintBits(buffer, &bits, &row);
-todo_wine {
         if (format == BPBF_COMPATIBLEBITMAP)
             ok(hr == E_FAIL, "Unexpected return code %#x\n", hr);
         else
@@ -657,7 +656,7 @@ todo_wine {
             ok(bits != NULL, "Bitmap bits %p\n", bits);
             ok(row > 0, "Bitmap width %d\n", row);
         }
-}
+
         hr = pEndBufferedPaint(buffer, FALSE);
         ok(hr == S_OK, "Unexpected return code %#x\n", hr);
     }




More information about the wine-cvs mailing list