Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c054d7bc
Commit
c054d7bc
authored
May 02, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: CreateDIBSection doesn't need a DC for the DIB_RGB_COLORS case.
parent
a0a95eb0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
surface.c
dlls/wined3d/surface.c
+1
-13
No files found.
dlls/wined3d/surface.c
View file @
c054d7bc
...
@@ -377,8 +377,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
...
@@ -377,8 +377,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
BITMAPINFO
*
b_info
;
BITMAPINFO
*
b_info
;
int
extraline
=
0
;
int
extraline
=
0
;
DWORD
*
masks
;
DWORD
*
masks
;
UINT
usage
;
HDC
dc
;
TRACE
(
"surface %p.
\n
"
,
surface
);
TRACE
(
"surface %p.
\n
"
,
surface
);
...
@@ -441,7 +439,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
...
@@ -441,7 +439,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
switch
(
surface
->
resource
.
format
->
id
)
switch
(
surface
->
resource
.
format
->
id
)
{
{
case
WINED3DFMT_B8G8R8_UNORM
:
case
WINED3DFMT_B8G8R8_UNORM
:
usage
=
DIB_RGB_COLORS
;
b_info
->
bmiHeader
.
biCompression
=
BI_RGB
;
b_info
->
bmiHeader
.
biCompression
=
BI_RGB
;
break
;
break
;
...
@@ -457,7 +454,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
...
@@ -457,7 +454,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
case
WINED3DFMT_B10G10R10A2_UNORM
:
case
WINED3DFMT_B10G10R10A2_UNORM
:
case
WINED3DFMT_B5G6R5_UNORM
:
case
WINED3DFMT_B5G6R5_UNORM
:
case
WINED3DFMT_R16G16B16A16_UNORM
:
case
WINED3DFMT_R16G16B16A16_UNORM
:
usage
=
0
;
b_info
->
bmiHeader
.
biCompression
=
BI_BITFIELDS
;
b_info
->
bmiHeader
.
biCompression
=
BI_BITFIELDS
;
masks
[
0
]
=
format
->
red_mask
;
masks
[
0
]
=
format
->
red_mask
;
masks
[
1
]
=
format
->
green_mask
;
masks
[
1
]
=
format
->
green_mask
;
...
@@ -467,21 +463,13 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
...
@@ -467,21 +463,13 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
default:
default:
/* Don't know palette */
/* Don't know palette */
b_info
->
bmiHeader
.
biCompression
=
BI_RGB
;
b_info
->
bmiHeader
.
biCompression
=
BI_RGB
;
usage
=
0
;
break
;
break
;
}
}
if
(
!
(
dc
=
GetDC
(
0
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
b_info
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
TRACE
(
"Creating a DIB section with size %dx%dx%d, size=%d.
\n
"
,
TRACE
(
"Creating a DIB section with size %dx%dx%d, size=%d.
\n
"
,
b_info
->
bmiHeader
.
biWidth
,
b_info
->
bmiHeader
.
biHeight
,
b_info
->
bmiHeader
.
biWidth
,
b_info
->
bmiHeader
.
biHeight
,
b_info
->
bmiHeader
.
biBitCount
,
b_info
->
bmiHeader
.
biSizeImage
);
b_info
->
bmiHeader
.
biBitCount
,
b_info
->
bmiHeader
.
biSizeImage
);
surface
->
dib
.
DIBsection
=
CreateDIBSection
(
dc
,
b_info
,
usage
,
&
surface
->
dib
.
bitmap_data
,
0
,
0
);
surface
->
dib
.
DIBsection
=
CreateDIBSection
(
0
,
b_info
,
DIB_RGB_COLORS
,
&
surface
->
dib
.
bitmap_data
,
0
,
0
);
ReleaseDC
(
0
,
dc
);
if
(
!
surface
->
dib
.
DIBsection
)
if
(
!
surface
->
dib
.
DIBsection
)
{
{
...
...
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