mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch to forward GIF encoder requests to windowscodecs.
This commit is contained in:
parent
7a6fec3740
commit
5fc6371a97
@ -39,7 +39,7 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [16]:**
|
||||
**Bug fixes and features included in the next upcoming release [17]:**
|
||||
|
||||
* Add implementation for kernel32.GetNumaProcessorNode ([Wine Bug #38660](https://bugs.winehq.org/show_bug.cgi?id=38660))
|
||||
* Add semi-stub for FileFsVolumeInformation information class ([Wine Bug #21466](https://bugs.winehq.org/show_bug.cgi?id=21466))
|
||||
@ -47,6 +47,7 @@ Included bug fixes and improvements
|
||||
* Allow to set pixel format for desktop window
|
||||
* Fix endless loop in regedit when importing files with very long lines
|
||||
* Fix link notification conditions for riched20 ([Wine Bug #35949](https://bugs.winehq.org/show_bug.cgi?id=35949))
|
||||
* Forward GIF encoder requests to windowscodecs ([Wine Bug #34356](https://bugs.winehq.org/show_bug.cgi?id=34356))
|
||||
* Implement default homepage button in inetcpl.cpl
|
||||
* Improve stub for NtQueryEaFile
|
||||
* Initialize System\CurrentControlSet\Control\TimeZoneInformation registry keys
|
||||
|
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -40,6 +40,7 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
|
||||
accounting on NVIDIA graphic cards.
|
||||
* Added patch to fix handling of periodic advice timers causing high CPU
|
||||
usage.
|
||||
* Added patch to forward GIF encoder requests to windowscodecs.
|
||||
* Removed patch to handle '\r' as whitespace in wbemprox queries (accepted
|
||||
upstream).
|
||||
* Removed patch to make sure OpenClipboard with current owner doesn't fail
|
||||
@ -50,6 +51,8 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
|
||||
(identical patch accepted upstream).
|
||||
* Removed patch to output winedbg system information also to the terminal
|
||||
(accepted upstream).
|
||||
* Removed patch to fix handling of periodic advice timers causing high CPU
|
||||
usage (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 31 May 2015 14:46:37 +0200
|
||||
|
||||
wine-staging (1.7.44) unstable; urgency=low
|
||||
|
@ -0,0 +1,151 @@
|
||||
From 5a9241dd76874080df0938618a2fbbb022250791 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 9 Jun 2015 05:46:41 +0200
|
||||
Subject: gdiplus: Forward GIF encoder requests to windowscodecs.
|
||||
|
||||
---
|
||||
dlls/gdiplus/image.c | 10 ++++--
|
||||
dlls/gdiplus/tests/image.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 94 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
|
||||
index 86802a5..1d2d6fa 100644
|
||||
--- a/dlls/gdiplus/image.c
|
||||
+++ b/dlls/gdiplus/image.c
|
||||
@@ -4401,6 +4401,12 @@ static GpStatus encode_image_jpeg(GpImage *image, IStream* stream,
|
||||
return encode_image_wic(image, stream, &GUID_ContainerFormatJpeg, params);
|
||||
}
|
||||
|
||||
+static GpStatus encode_image_gif(GpImage *image, IStream* stream,
|
||||
+ GDIPCONST CLSID* clsid, GDIPCONST EncoderParameters* params)
|
||||
+{
|
||||
+ return encode_image_wic(image, stream, &CLSID_WICGifEncoder, params);
|
||||
+}
|
||||
+
|
||||
/*****************************************************************************
|
||||
* GdipSaveImageToStream [GDIPLUS.@]
|
||||
*/
|
||||
@@ -4611,14 +4617,14 @@ static const struct image_codec codecs[NUM_CODECS] = {
|
||||
/* FormatDescription */ gif_format,
|
||||
/* FilenameExtension */ gif_extension,
|
||||
/* MimeType */ gif_mimetype,
|
||||
- /* Flags */ ImageCodecFlagsDecoder | ImageCodecFlagsSupportBitmap | ImageCodecFlagsBuiltin,
|
||||
+ /* Flags */ ImageCodecFlagsDecoder | ImageCodecFlagsEncoder | ImageCodecFlagsSupportBitmap | ImageCodecFlagsBuiltin,
|
||||
/* Version */ 1,
|
||||
/* SigCount */ 2,
|
||||
/* SigSize */ 6,
|
||||
/* SigPattern */ gif_sig_pattern,
|
||||
/* SigMask */ gif_sig_mask,
|
||||
},
|
||||
- NULL,
|
||||
+ encode_image_gif,
|
||||
decode_image_gif,
|
||||
select_frame_gif
|
||||
},
|
||||
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
|
||||
index 63fc96e..8a85828 100644
|
||||
--- a/dlls/gdiplus/tests/image.c
|
||||
+++ b/dlls/gdiplus/tests/image.c
|
||||
@@ -4544,6 +4544,91 @@ static void test_CloneBitmapArea(void)
|
||||
GdipDisposeImage((GpImage *)bitmap);
|
||||
}
|
||||
|
||||
+static BOOL get_encoder_clsid(LPCWSTR mime, GUID *format, CLSID *clsid)
|
||||
+{
|
||||
+ GpStatus status;
|
||||
+ UINT n_codecs, info_size, i;
|
||||
+ ImageCodecInfo *info;
|
||||
+ BOOL ret = FALSE;
|
||||
+
|
||||
+ status = GdipGetImageEncodersSize(&n_codecs, &info_size);
|
||||
+ expect(Ok, status);
|
||||
+
|
||||
+ info = GdipAlloc(info_size);
|
||||
+
|
||||
+ status = GdipGetImageEncoders(n_codecs, info_size, info);
|
||||
+ expect(Ok, status);
|
||||
+
|
||||
+ for (i = 0; i < n_codecs; i++)
|
||||
+ {
|
||||
+ if (!lstrcmpW(info[i].MimeType, mime))
|
||||
+ {
|
||||
+ *format = info[i].FormatID;
|
||||
+ *clsid = info[i].Clsid;
|
||||
+ ret = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ GdipFree(info);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void test_supported_encoders(void)
|
||||
+{
|
||||
+ static const WCHAR bmp_mimetype[] = {'i', 'm', 'a','g', 'e', '/', 'b', 'm', 'p', 0};
|
||||
+ static const WCHAR jpeg_mimetype[] = {'i','m','a','g','e','/','j','p','e','g', 0};
|
||||
+ static const WCHAR gif_mimetype[] = {'i','m','a','g','e','/','g','i','f', 0};
|
||||
+ static const WCHAR tiff_mimetype[] = {'i','m','a','g','e','/','t','i','f','f', 0};
|
||||
+ static const WCHAR png_mimetype[] = {'i','m','a','g','e','/','p','n','g', 0};
|
||||
+ static const struct test_data
|
||||
+ {
|
||||
+ LPCWSTR mime;
|
||||
+ const GUID *format;
|
||||
+ BOOL todo;
|
||||
+ } td[] =
|
||||
+ {
|
||||
+ { bmp_mimetype, &ImageFormatBMP, FALSE },
|
||||
+ { jpeg_mimetype, &ImageFormatJPEG, FALSE },
|
||||
+ { gif_mimetype, &ImageFormatGIF, TRUE },
|
||||
+ { tiff_mimetype, &ImageFormatTIFF, FALSE },
|
||||
+ { png_mimetype, &ImageFormatPNG, FALSE }
|
||||
+ };
|
||||
+ GUID format, clsid;
|
||||
+ BOOL ret;
|
||||
+ HRESULT hr;
|
||||
+ GpStatus status;
|
||||
+ GpBitmap *bm;
|
||||
+ IStream *stream;
|
||||
+ HGLOBAL hmem;
|
||||
+ int i;
|
||||
+
|
||||
+ status = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat24bppRGB, NULL, &bm);
|
||||
+ ok(status == Ok, "GdipCreateBitmapFromScan0 error %d\n", status);
|
||||
+
|
||||
+ for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
|
||||
+ {
|
||||
+ ret = get_encoder_clsid(td[i].mime, &format, &clsid);
|
||||
+ ok(ret, "%s encoder is not in the list\n", wine_dbgstr_w(td[i].mime));
|
||||
+ expect_guid(td[i].format, &format, __LINE__, FALSE);
|
||||
+
|
||||
+ hmem = GlobalAlloc(GMEM_MOVEABLE | GMEM_NODISCARD, 16);
|
||||
+
|
||||
+ hr = CreateStreamOnHGlobal(hmem, TRUE, &stream);
|
||||
+ ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
|
||||
+
|
||||
+ status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL);
|
||||
+ if (td[i].todo)
|
||||
+ todo_wine ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
|
||||
+ else
|
||||
+ ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
|
||||
+
|
||||
+ IStream_Release(stream);
|
||||
+ }
|
||||
+
|
||||
+ GdipDisposeImage((GpImage *)bm);
|
||||
+}
|
||||
+
|
||||
START_TEST(image)
|
||||
{
|
||||
struct GdiplusStartupInput gdiplusStartupInput;
|
||||
@@ -4556,6 +4641,7 @@ START_TEST(image)
|
||||
|
||||
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
||||
|
||||
+ test_supported_encoders();
|
||||
test_CloneBitmapArea();
|
||||
test_ARGB_conversion();
|
||||
test_DrawImage_scale();
|
||||
--
|
||||
2.4.2
|
||||
|
1
patches/gdiplus-GIF_Encoder/definition
Normal file
1
patches/gdiplus-GIF_Encoder/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [34356] Forward GIF encoder requests to windowscodecs
|
@ -124,6 +124,7 @@ patch_enable_all ()
|
||||
enable_gdi32_Default_Palette="$1"
|
||||
enable_gdi32_MaxPixelFormats="$1"
|
||||
enable_gdi32_MultiMonitor="$1"
|
||||
enable_gdiplus_GIF_Encoder="$1"
|
||||
enable_gdiplus_GdipCreateEffect="$1"
|
||||
enable_gdiplus_GdipCreateRegionRgnData="$1"
|
||||
enable_imagehlp_BindImageEx="$1"
|
||||
@ -454,6 +455,9 @@ patch_enable ()
|
||||
gdi32-MultiMonitor)
|
||||
enable_gdi32_MultiMonitor="$2"
|
||||
;;
|
||||
gdiplus-GIF_Encoder)
|
||||
enable_gdiplus_GIF_Encoder="$2"
|
||||
;;
|
||||
gdiplus-GdipCreateEffect)
|
||||
enable_gdiplus_GdipCreateEffect="$2"
|
||||
;;
|
||||
@ -2875,6 +2879,21 @@ if test "$enable_gdi32_MultiMonitor" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset gdiplus-GIF_Encoder
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#34356] Forward GIF encoder requests to windowscodecs
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/gdiplus/image.c, dlls/gdiplus/tests/image.c
|
||||
# |
|
||||
if test "$enable_gdiplus_GIF_Encoder" -eq 1; then
|
||||
patch_apply gdiplus-GIF_Encoder/0001-gdiplus-Forward-GIF-encoder-requests-to-windowscodec.patch
|
||||
(
|
||||
echo '+ { "Dmitry Timoshkov", "gdiplus: Forward GIF encoder requests to windowscodecs.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset gdiplus-GdipCreateEffect
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -5150,42 +5169,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-UnhandledBlendFactor
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/state.c
|
||||
# |
|
||||
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
|
||||
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-resource_check_usage
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/resource.c
|
||||
# |
|
||||
if test "$enable_wined3d_resource_check_usage" -eq 1; then
|
||||
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
|
||||
(
|
||||
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_swapchain_present
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/swapchain.c
|
||||
# |
|
||||
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
|
||||
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Multisampling
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -5235,6 +5218,42 @@ if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-UnhandledBlendFactor
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/state.c
|
||||
# |
|
||||
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
|
||||
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-resource_check_usage
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/resource.c
|
||||
# |
|
||||
if test "$enable_wined3d_resource_check_usage" -eq 1; then
|
||||
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
|
||||
(
|
||||
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_swapchain_present
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/swapchain.c
|
||||
# |
|
||||
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
|
||||
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user