From bd3f878021c66b6a7f76ef67ac15d3db1c7f01e3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 25 Aug 2021 13:39:49 +0100 Subject: [PATCH] gdi32: Use NtGdiCreateSolidBrush for CreateSolidBrush. Signed-off-by: Jacek Caban Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/gdi32/brush.c | 4 ++-- dlls/gdi32/objects.c | 8 ++++++++ include/ntgdi.h | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 75737d1083b..d3b83beffe8 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -268,11 +268,11 @@ HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse ) /*********************************************************************** - * CreateSolidBrush (GDI32.@) + * NtGdiCreateSolidBrush (win32u.@) * * Create a logical brush consisting of a single colour. */ -HBRUSH WINAPI CreateSolidBrush( COLORREF color ) +HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color, HBRUSH brush ) { LOGBRUSH logbrush; diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c index 48474515151..b68cdd455b9 100644 --- a/dlls/gdi32/objects.c +++ b/dlls/gdi32/objects.c @@ -424,6 +424,14 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH *brush ) } } +/*********************************************************************** + * CreateSolidBrush (GDI32.@) + */ +HBRUSH WINAPI CreateSolidBrush( COLORREF color ) +{ + return NtGdiCreateSolidBrush( color, NULL ); +} + /*********************************************************************** * CreateBitmapIndirect (GDI32.@) */ diff --git a/include/ntgdi.h b/include/ntgdi.h index ba4d2ff3556..d275a239434 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -202,7 +202,7 @@ HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH bru HRGN WINAPI NtGdiCreateRectRgn( INT left, INT top, INT right, INT bottom ); HRGN WINAPI NtGdiCreateRoundRectRgn( INT left, INT top, INT right, INT bottom, INT ellipse_width, INT ellipse_height ); -HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color ); +HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color, HBRUSH brush ); BOOL WINAPI NtGdiDeleteClientObj( HGDIOBJ obj ); BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj ); LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entries,