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
36a0bb0f
Commit
36a0bb0f
authored
Jul 27, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jul 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid unnecessary calls to get_dc_ptr().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6a8cfea9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+4
-15
gdi_private.h
dlls/gdi32/gdi_private.h
+7
-0
No files found.
dlls/gdi32/dibdrv/bitblt.c
View file @
36a0bb0f
...
@@ -1390,18 +1390,12 @@ COLORREF get_pixel_bitmapinfo( const BITMAPINFO *info, void *bits, struct bitblt
...
@@ -1390,18 +1390,12 @@ COLORREF get_pixel_bitmapinfo( const BITMAPINFO *info, void *bits, struct bitblt
BOOL
dibdrv_StretchBlt
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
BOOL
dibdrv_StretchBlt
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
DWORD
rop
)
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
DWORD
rop
)
{
{
BOOL
ret
;
DC
*
dc_dst
=
get_physdev_dc
(
dst_dev
);
DC
*
dc_dst
=
get_dc_ptr
(
dst_dev
->
hdc
);
if
(
!
dc_dst
)
return
FALSE
;
if
(
dst
->
width
==
1
&&
src
->
width
>
1
)
src
->
width
--
;
if
(
dst
->
width
==
1
&&
src
->
width
>
1
)
src
->
width
--
;
if
(
dst
->
height
==
1
&&
src
->
height
>
1
)
src
->
height
--
;
if
(
dst
->
height
==
1
&&
src
->
height
>
1
)
src
->
height
--
;
ret
=
dc_dst
->
nulldrv
.
funcs
->
pStretchBlt
(
&
dc_dst
->
nulldrv
,
dst
,
return
dc_dst
->
nulldrv
.
funcs
->
pStretchBlt
(
&
dc_dst
->
nulldrv
,
dst
,
src_dev
,
src
,
rop
);
src_dev
,
src
,
rop
);
release_dc_ptr
(
dc_dst
);
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
...
@@ -1410,14 +1404,9 @@ BOOL dibdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -1410,14 +1404,9 @@ BOOL dibdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
BOOL
dibdrv_AlphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
BOOL
dibdrv_AlphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
BLENDFUNCTION
blend
)
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
BLENDFUNCTION
blend
)
{
{
BOOL
ret
;
DC
*
dc_dst
=
get_physdev_dc
(
dst_dev
);
DC
*
dc_dst
=
get_dc_ptr
(
dst_dev
->
hdc
);
if
(
!
dc_dst
)
return
FALSE
;
return
dc_dst
->
nulldrv
.
funcs
->
pAlphaBlend
(
&
dc_dst
->
nulldrv
,
dst
,
src_dev
,
src
,
blend
);
ret
=
dc_dst
->
nulldrv
.
funcs
->
pAlphaBlend
(
&
dc_dst
->
nulldrv
,
dst
,
src_dev
,
src
,
blend
);
release_dc_ptr
(
dc_dst
);
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/gdi32/gdi_private.h
View file @
36a0bb0f
...
@@ -469,6 +469,13 @@ static inline DC *get_nulldrv_dc( PHYSDEV dev )
...
@@ -469,6 +469,13 @@ static inline DC *get_nulldrv_dc( PHYSDEV dev )
return
CONTAINING_RECORD
(
dev
,
DC
,
nulldrv
);
return
CONTAINING_RECORD
(
dev
,
DC
,
nulldrv
);
}
}
static
inline
DC
*
get_physdev_dc
(
PHYSDEV
dev
)
{
while
(
dev
->
funcs
!=
&
null_driver
)
dev
=
dev
->
next
;
return
get_nulldrv_dc
(
dev
);
}
/* Undocumented value for DIB's iUsage: Indicates a mono DIB w/o pal entries */
/* Undocumented value for DIB's iUsage: Indicates a mono DIB w/o pal entries */
#define DIB_PAL_MONO 2
#define DIB_PAL_MONO 2
...
...
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