Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a3273a58
Commit
a3273a58
authored
May 30, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Derive bitmap options from surface description in CreateSharedBitmap().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
08be8fd5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
bitmap.c
dlls/d2d1/bitmap.c
+1
-0
device.c
dlls/d2d1/device.c
+4
-1
d2d1.c
dlls/d2d1/tests/d2d1.c
+0
-1
No files found.
dlls/d2d1/bitmap.c
View file @
a3273a58
...
@@ -616,6 +616,7 @@ HRESULT d2d_bitmap_create_shared(struct d2d_device_context *context, REFIID iid,
...
@@ -616,6 +616,7 @@ HRESULT d2d_bitmap_create_shared(struct d2d_device_context *context, REFIID iid,
{
{
memset
(
&
d
,
0
,
sizeof
(
d
));
memset
(
&
d
,
0
,
sizeof
(
d
));
d
.
pixelFormat
.
format
=
surface_desc
.
Format
;
d
.
pixelFormat
.
format
=
surface_desc
.
Format
;
d
.
bitmapOptions
=
d2d_get_bitmap_options_for_surface
(
surface
);
}
}
else
else
{
{
...
...
dlls/d2d1/device.c
View file @
a3273a58
...
@@ -405,7 +405,10 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSharedBitmap(ID2D1Devi
...
@@ -405,7 +405,10 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSharedBitmap(ID2D1Devi
if
(
desc
)
if
(
desc
)
{
{
memcpy
(
&
bitmap_desc
,
desc
,
sizeof
(
*
desc
));
memcpy
(
&
bitmap_desc
,
desc
,
sizeof
(
*
desc
));
bitmap_desc
.
bitmapOptions
=
D2D1_BITMAP_OPTIONS_TARGET
|
D2D1_BITMAP_OPTIONS_CANNOT_DRAW
;
if
(
IsEqualIID
(
iid
,
&
IID_IDXGISurface
)
||
IsEqualIID
(
iid
,
&
IID_IDXGISurface1
))
bitmap_desc
.
bitmapOptions
=
d2d_get_bitmap_options_for_surface
(
data
);
else
bitmap_desc
.
bitmapOptions
=
D2D1_BITMAP_OPTIONS_TARGET
|
D2D1_BITMAP_OPTIONS_CANNOT_DRAW
;
bitmap_desc
.
colorContext
=
NULL
;
bitmap_desc
.
colorContext
=
NULL
;
}
}
...
...
dlls/d2d1/tests/d2d1.c
View file @
a3273a58
...
@@ -11772,7 +11772,6 @@ static void test_bitmap_map(BOOL d3d11)
...
@@ -11772,7 +11772,6 @@ static void test_bitmap_map(BOOL d3d11)
hr
=
ID2D1Bitmap_QueryInterface
(
bitmap2
,
&
IID_ID2D1Bitmap1
,
(
void
**
)
&
bitmap
);
hr
=
ID2D1Bitmap_QueryInterface
(
bitmap2
,
&
IID_ID2D1Bitmap1
,
(
void
**
)
&
bitmap
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
options
=
ID2D1Bitmap1_GetOptions
(
bitmap
);
options
=
ID2D1Bitmap1_GetOptions
(
bitmap
);
todo_wine
ok
(
options
==
(
D2D1_BITMAP_OPTIONS_CANNOT_DRAW
|
D2D1_BITMAP_OPTIONS_CPU_READ
),
ok
(
options
==
(
D2D1_BITMAP_OPTIONS_CANNOT_DRAW
|
D2D1_BITMAP_OPTIONS_CPU_READ
),
"Unexpected options %#x.
\n
"
,
options
);
"Unexpected options %#x.
\n
"
,
options
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment