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
c8a48f23
Commit
c8a48f23
authored
Sep 30, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Don't create a DIB section for non-alpha or reference bitmaps.
parent
473afa4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
image.c
dlls/gdiplus/image.c
+1
-13
graphics.c
dlls/gdiplus/tests/graphics.c
+1
-1
No files found.
dlls/gdiplus/image.c
View file @
c8a48f23
...
...
@@ -1630,7 +1630,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
INT
row_size
,
dib_stride
;
HDC
hdc
;
BYTE
*
bits
=
NULL
,
*
own_bits
=
NULL
;
int
i
;
REAL
xres
,
yres
;
GpStatus
stat
;
...
...
@@ -1655,7 +1654,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
if
(
stride
==
0
)
stride
=
dib_stride
;
if
(
format
&
PixelFormatGDI
)
if
(
format
&
PixelFormatGDI
&&
!
(
format
&
(
PixelFormatAlpha
|
PixelFormatIndexed
))
&&
!
scan0
)
{
pbmi
=
GdipAlloc
(
sizeof
(
BITMAPINFOHEADER
)
+
256
*
sizeof
(
RGBQUAD
));
if
(
!
pbmi
)
...
...
@@ -1691,12 +1690,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
{
/* Not a GDI format; don't try to make an HBITMAP. */
if
(
scan0
)
{
/* FIXME: We should do this with GDI formats too when scan0 is
* provided, but for now we need the HDC for most drawing
* operations. */
bits
=
scan0
;
}
else
{
INT
size
=
abs
(
stride
)
*
height
;
...
...
@@ -1709,12 +1703,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
}
}
/* copy bits to the dib if necessary */
/* FIXME: should reference the bits instead of copying them */
if
(
scan0
&&
bits
!=
scan0
)
for
(
i
=
0
;
i
<
height
;
i
++
)
memcpy
(
bits
+
i
*
dib_stride
,
scan0
+
i
*
stride
,
row_size
);
*
bitmap
=
GdipAlloc
(
sizeof
(
GpBitmap
));
if
(
!*
bitmap
)
{
...
...
dlls/gdiplus/tests/graphics.c
View file @
c8a48f23
...
...
@@ -2194,7 +2194,7 @@ static void test_fromMemoryBitmap(void)
GdipDeleteGraphics
(
graphics
);
todo_wine
expect
(
0x79
,
bits
[
0
]);
expect
(
0x79
,
bits
[
0
]);
todo_wine
expect
(
0x68
,
bits
[
3
]);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
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