Rebase against bf4d0982fd88f9c8848b9e27bb1391d45d18b68e

This commit is contained in:
Alistair Leslie-Hughes 2018-05-24 10:15:30 +10:00
parent 1121536608
commit 51557bbf6e
3 changed files with 31 additions and 707 deletions

View File

@ -1,18 +1,18 @@
From b9218f8580e217d01bbef80ff78b21c877fd4a3f Mon Sep 17 00:00:00 2001
From 9eee499bc9b042041d32d0350b02f7ada9b89548 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucian.poston@gmail.com>
Date: Wed, 2 May 2018 22:38:33 -0700
Subject: d2d1: Add d2d1_1.idl for drawing ID2D1Bitmap1
Subject: [PATCH] d2d1: Add d2d1_1.idl for drawing ID2D1Bitmap1
https://bugs.winehq.org/show_bug.cgi?id=44052
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
include/d2d1_1.idl | 462 ++++++++++++++++++++++++++++++++++++++++++++++++++++
include/d2d1_1.idl | 436 ++++++++++++++++++++++++++++++++++++++++++++++++++--
include/dcommon.idl | 15 ++
2 files changed, 477 insertions(+)
2 files changed, 441 insertions(+), 10 deletions(-)
diff --git a/include/d2d1_1.idl b/include/d2d1_1.idl
index 2b1ef2e..33a661c 100644
index 4b6224a..26c6e70 100644
--- a/include/d2d1_1.idl
+++ b/include/d2d1_1.idl
@@ -18,6 +18,11 @@
@ -27,10 +27,27 @@ index 2b1ef2e..33a661c 100644
interface ID2D1DeviceContext;
interface ID2D1StrokeStyle1;
interface ID2D1PathGeometry1;
@@ -76,6 +81,82 @@ typedef enum D2D1_COLOR_SPACE
@@ -77,16 +82,6 @@ typedef enum D2D1_COLOR_SPACE
D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
} D2D1_COLOR_SPACE;
-typedef enum D2D1_BITMAP_OPTIONS
-{
- D2D1_BITMAP_OPTIONS_NONE = 0x0,
- D2D1_BITMAP_OPTIONS_TARGET = 0x1,
- D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x2,
- D2D1_BITMAP_OPTIONS_CPU_READ = 0x4,
- D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x8,
- D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
-} D2D1_BITMAP_OPTIONS;
-
typedef enum D2D1_MAP_OPTIONS
{
D2D1_MAP_OPTIONS_NONE = 0x0,
@@ -96,6 +91,73 @@ typedef enum D2D1_MAP_OPTIONS
D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
} D2D1_MAP_OPTIONS;
+typedef enum D2D1_BITMAP_OPTIONS
+{
+ D2D1_BITMAP_OPTIONS_NONE = 0,
@ -96,30 +113,15 @@ index 2b1ef2e..33a661c 100644
+ D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
+} D2D1_LAYER_OPTIONS1;
+
+typedef enum D2D1_MAP_OPTIONS
+{
+ D2D1_MAP_OPTIONS_NONE = 0,
+ D2D1_MAP_OPTIONS_READ = 1,
+ D2D1_MAP_OPTIONS_WRITE = 2,
+ D2D1_MAP_OPTIONS_DISCARD = 4,
+ D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
+} D2D1_MAP_OPTIONS;
+
+typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
+typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
typedef struct D2D1_STROKE_STYLE_PROPERTIES1
@@ -108,6 +189,69 @@ typedef struct D2D1_PRINT_CONTROL_PROPERTIES
D2D1_COLOR_SPACE colorSpace;
} D2D1_PRINT_CONTROL_PROPERTIES;
@@ -134,6 +196,63 @@ typedef struct D2D1_MAPPED_RECT
BYTE *bits;
} D2D1_MAPPED_RECT;
+typedef struct D2D1_MAPPED_RECT
+{
+ UINT32 pitch;
+ BYTE *bits;
+} D2D1_MAPPED_RECT;
+
+typedef struct D2D1_LAYER_PARAMETERS1
+{
+ D2D1_RECT_F contentBounds;
@ -180,7 +182,7 @@ index 2b1ef2e..33a661c 100644
typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
[
@@ -193,3 +337,321 @@ interface ID2D1Factory1 : ID2D1Factory
@@ -240,3 +359,300 @@ interface ID2D1Factory1 : ID2D1Factory
[out] ID2D1Properties **props
);
}
@ -188,27 +190,6 @@ index 2b1ef2e..33a661c 100644
+[
+ local,
+ object,
+ uuid(a898a84c-3873-4588-b08b-ebbf978df041)
+]
+interface ID2D1Bitmap1 : ID2D1Bitmap
+{
+ void GetColorContext(
+ [out] ID2D1ColorContext **color_context
+ );
+ D2D1_BITMAP_OPTIONS GetOptions();
+ HRESULT GetSurface(
+ [out] IDXGISurface **surface
+ );
+ HRESULT Map(
+ D2D1_MAP_OPTIONS options,
+ [out] D2D1_MAPPED_RECT *mapped_rect
+ );
+ HRESULT Unmap();
+}
+
+[
+ local,
+ object,
+ uuid(ae1572f4-5dd0-4777-998b-9279472ae63b)
+]
+interface ID2D1GradientStopCollection1 : ID2D1GradientStopCollection
@ -526,5 +507,5 @@ index db5055d..18f2fbe 100644
+ };
+} D2D_MATRIX_4X4_F;
--
2.7.4
1.9.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "da5112c74313b5236183135204cab38a8b0169ed"
echo "bf4d0982fd88f9c8848b9e27bb1391d45d18b68e"
}
# Show version information
@ -2886,21 +2886,19 @@ fi
# | * [#44052] - Add ID2D1Bitmap1/ID2D1Factory1 support
# |
# | Modified files:
# | * dlls/d2d1/Makefile.in, dlls/d2d1/bitmap.c, dlls/d2d1/brush.c, dlls/d2d1/d2d1_private.h, dlls/d2d1/device.c,
# | dlls/d2d1/device_context.c, dlls/d2d1/factory.c, dlls/d2d1/geometry.c, include/d2d1_1.idl, include/dcommon.idl
# | * dlls/d2d1/Makefile.in, dlls/d2d1/d2d1_private.h, dlls/d2d1/device.c, dlls/d2d1/device_context.c, dlls/d2d1/factory.c,
# | dlls/d2d1/geometry.c, include/d2d1_1.idl, include/dcommon.idl
# |
if test "$enable_d2d1_ID2D1Factory1" -eq 1; then
patch_apply d2d1-ID2D1Factory1/0001-d2d1-Add-d2d1_1.idl-for-drawing-ID2D1Bitmap1.patch
patch_apply d2d1-ID2D1Factory1/0003-d2d1-Use-ID2D1Factory1-in-d2d_geometry.patch
patch_apply d2d1-ID2D1Factory1/0005-d2d1-Stub-ID2D1DeviceContext.patch
patch_apply d2d1-ID2D1Factory1/0006-d2d1-Implement-ID2D1DeviceContext.patch
patch_apply d2d1-ID2D1Factory1/0007-d2d1-Implement-ID2D1Bitmap1.patch
(
printf '%s\n' '+ { "Lucian Poston", "d2d1: Add d2d1_1.idl for drawing ID2D1Bitmap1.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "d2d1: Use ID2D1Factory1 in d2d_geometry.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "d2d1: Stub ID2D1DeviceContext.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "d2d1: Implement ID2D1DeviceContext.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "d2d1: Implement ID2D1Bitmap1.", 1 },';
) >> "$patchlist"
fi