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
2818a676
Commit
2818a676
authored
Oct 13, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimized StretchDIBits to call SetDIBitsToDevice (when src & dst
dimensions are equal).
parent
73077e3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
dib.c
objects/dib.c
+22
-16
No files found.
objects/dib.c
View file @
2818a676
...
...
@@ -135,33 +135,39 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
const
BITMAPINFO
*
info
,
UINT
wUsage
,
DWORD
dwRop
)
{
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
widthDst
==
widthSrc
&&
heightDst
==
heightSrc
&&
dwRop
==
SRCCOPY
)
{
return
SetDIBitsToDevice
(
hdc
,
xDst
,
yDst
,
widthDst
,
heightDst
,
xSrc
,
ySrc
,
0
,
info
->
bmiHeader
.
biHeight
,
bits
,
info
,
0
/*FIXME coloruse*/
);
}
if
(
dc
->
funcs
->
pStretchDIBits
)
return
dc
->
funcs
->
pStretchDIBits
(
dc
,
xDst
,
yDst
,
widthDst
,
heightDst
,
xSrc
,
ySrc
,
widthSrc
,
heightSrc
,
bits
,
info
,
wUsage
,
dwRop
);
else
{
/* use StretchBlt32 */
HBITMAP
hBitmap
,
hOldBitmap
;
HDC
hdcMem
;
hBitmap
=
CreateDIBitmap
(
hdc
,
&
info
->
bmiHeader
,
CBM_INIT
,
bits
,
info
,
wUsage
);
hdcMem
=
CreateCompatibleDC
(
hdc
);
hOldBitmap
=
SelectObject
(
hdcMem
,
hBitmap
);
/* Origin for DIBitmap is bottom left ! */
StretchBlt
(
hdc
,
xDst
,
yDst
,
widthDst
,
heightDst
,
hdcMem
,
xSrc
,
info
->
bmiHeader
.
biHeight
-
heightSrc
-
ySrc
,
widthSrc
,
heightSrc
,
dwRop
);
SelectObject
(
hdcMem
,
hOldBitmap
);
DeleteDC
(
hdcMem
);
DeleteObject
(
hBitmap
);
return
heightSrc
;
HBITMAP
hBitmap
,
hOldBitmap
;
HDC
hdcMem
;
hBitmap
=
CreateDIBitmap
(
hdc
,
&
info
->
bmiHeader
,
CBM_INIT
,
bits
,
info
,
wUsage
);
hdcMem
=
CreateCompatibleDC
(
hdc
);
hOldBitmap
=
SelectObject
(
hdcMem
,
hBitmap
);
/* Origin for DIBitmap is bottom left ! */
StretchBlt
(
hdc
,
xDst
,
yDst
,
widthDst
,
heightDst
,
hdcMem
,
xSrc
,
info
->
bmiHeader
.
biHeight
-
heightSrc
-
ySrc
,
widthSrc
,
heightSrc
,
dwRop
);
SelectObject
(
hdcMem
,
hOldBitmap
);
DeleteDC
(
hdcMem
);
DeleteObject
(
hBitmap
);
}
return
heightSrc
;
}
/***********************************************************************
* SetDIBits16 (GDI.440)
*/
...
...
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