[PATCH] gdiplus: Added GdipSetImageAttributesNoOp()

Nikolay Sivov nsivov at codeweavers.com
Mon Oct 9 02:46:32 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/gdiplus/imageattributes.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/dlls/gdiplus/imageattributes.c b/dlls/gdiplus/imageattributes.c
index 205070668e..5ab08e5bbb 100644
--- a/dlls/gdiplus/imageattributes.c
+++ b/dlls/gdiplus/imageattributes.c
@@ -218,14 +218,17 @@ GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageAttr,
 GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageAttr,
     ColorAdjustType type, BOOL enableFlag)
 {
-    static int calls;
-
     TRACE("(%p,%u,%i)\n", imageAttr, type, enableFlag);
 
-    if(!(calls++))
-        FIXME("not implemented\n");
+    if (!imageAttr || type >= ColorAdjustTypeCount)
+        return InvalidParameter;
 
-    return NotImplemented;
+    imageAttr->colorkeys[type].enabled = enableFlag;
+    imageAttr->colormatrices[type].enabled = enableFlag;
+    imageAttr->colorremaptables[type].enabled = enableFlag;
+    imageAttr->gamma_enabled[type] = enableFlag;
+
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes *imageAttr,
-- 
2.14.2




More information about the wine-patches mailing list