winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
838 discussions
Start a n
N
ew thread
Huw Davies : gdi32: Allow dib_info structures to share colour tables.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: e844bddc369fd3abb77cfc8e512359216e6070f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e844bddc369fd3abb77cfc8e5…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jul 12 16:12:05 2011 +0100 gdi32: Allow dib_info structures to share colour tables. --- dlls/gdi32/dibdrv/dc.c | 31 ++++++++++++++++++++++--------- dlls/gdi32/gdi_private.h | 7 +++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 575221b..2923aeb 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -64,7 +64,7 @@ static void init_bit_fields(dib_info *dib, const DWORD *bit_fields) } static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD *bit_fields, - RGBQUAD *color_table, int color_table_size, void *bits) + RGBQUAD *color_table, int color_table_size, void *bits, enum dib_info_flags flags) { static const DWORD bit_fields_888[3] = {0xff0000, 0x00ff00, 0x0000ff}; static const DWORD bit_fields_555[3] = {0x7c00, 0x03e0, 0x001f}; @@ -75,6 +75,7 @@ static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD dib->stride = ((dib->width * dib->bit_count + 31) >> 3) & ~3; dib->bits = bits; dib->ptr_to_free = NULL; + dib->flags = flags; if(dib->height < 0) /* top-down */ { @@ -138,10 +139,15 @@ static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD if(color_table) { - dib->color_table = HeapAlloc(GetProcessHeap(), 0, color_table_size * sizeof(dib->color_table[0])); - if(!dib->color_table) return FALSE; + if (flags & private_color_table) + { + dib->color_table = HeapAlloc(GetProcessHeap(), 0, color_table_size * sizeof(dib->color_table[0])); + if(!dib->color_table) return FALSE; + memcpy(dib->color_table, color_table, color_table_size * sizeof(color_table[0])); + } + else + dib->color_table = color_table; dib->color_table_size = color_table_size; - memcpy(dib->color_table, color_table, color_table_size * sizeof(color_table[0])); } else { @@ -191,7 +197,7 @@ BOOL init_dib_info_from_packed(dib_info *dib, const BITMAPINFOHEADER *bi, WORD u } } - return init_dib_info(dib, bi, masks, color_table, num_colors, ptr); + return init_dib_info(dib, bi, masks, color_table, num_colors, ptr, private_color_table); } static void clear_dib_info(dib_info *dib) @@ -208,7 +214,8 @@ static void clear_dib_info(dib_info *dib) */ void free_dib_info(dib_info *dib) { - HeapFree(GetProcessHeap(), 0, dib->color_table); + if (dib->flags & private_color_table) + HeapFree(GetProcessHeap(), 0, dib->color_table); dib->color_table = NULL; HeapFree(GetProcessHeap(), 0, dib->ptr_to_free); @@ -231,11 +238,17 @@ void copy_dib_color_info(dib_info *dst, const dib_info *src) dst->funcs = src->funcs; dst->color_table_size = src->color_table_size; dst->color_table = NULL; + dst->flags = src->flags; if(dst->color_table_size) { int size = dst->color_table_size * sizeof(dst->color_table[0]); - dst->color_table = HeapAlloc(GetProcessHeap(), 0, size); - memcpy(dst->color_table, src->color_table, size); + if (dst->flags & private_color_table) + { + dst->color_table = HeapAlloc(GetProcessHeap(), 0, size); + memcpy(dst->color_table, src->color_table, size); + } + else + dst->color_table = src->color_table; } } @@ -315,7 +328,7 @@ static HBITMAP CDECL dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap ) pdev->brush_and_bits = pdev->brush_xor_bits = NULL; if(!init_dib_info(&pdev->dib, &bmp->dib->dsBmih, bmp->dib->dsBitfields, - bmp->color_table, bmp->nb_colors, bmp->dib->dsBm.bmBits)) + bmp->color_table, bmp->nb_colors, bmp->dib->dsBm.bmBits, private_color_table)) pdev->defer |= DEFER_FORMAT; GDI_ReleaseObj( bitmap ); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index c5ff4ba..7065d98 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -73,6 +73,11 @@ typedef struct tagGDIOBJHDR /* Device functions for the Wine driver interface */ +enum dib_info_flags +{ + private_color_table = 1 +}; + typedef struct { int bit_count, width, height; @@ -87,6 +92,8 @@ typedef struct RGBQUAD *color_table; DWORD color_table_size; + enum dib_info_flags flags; + const struct primitive_funcs *funcs; } dib_info;
1
0
0
0
Huw Davies : gdi32: Simplify the optional free'ing of bits pointer.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: 00a386ebf93867b561ff1263ee921142441effa8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00a386ebf93867b561ff1263e…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jul 12 16:12:04 2011 +0100 gdi32: Simplify the optional free'ing of bits pointer. --- dlls/gdi32/dibdrv/dc.c | 19 ++++++++++--------- dlls/gdi32/dibdrv/dibdrv.h | 2 +- dlls/gdi32/dibdrv/objects.c | 4 ++-- dlls/gdi32/gdi_private.h | 1 + 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 1f8b321..575221b 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -74,6 +74,7 @@ static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD dib->height = bi->biHeight; dib->stride = ((dib->width * dib->bit_count + 31) >> 3) & ~3; dib->bits = bits; + dib->ptr_to_free = NULL; if(dib->height < 0) /* top-down */ { @@ -197,6 +198,7 @@ static void clear_dib_info(dib_info *dib) { dib->color_table = NULL; dib->bits = NULL; + dib->ptr_to_free = NULL; } /********************************************************************** @@ -204,15 +206,14 @@ static void clear_dib_info(dib_info *dib) * * Free the resources associated with a dib and optionally the bits */ -void free_dib_info(dib_info *dib, BOOL free_bits) +void free_dib_info(dib_info *dib) { HeapFree(GetProcessHeap(), 0, dib->color_table); dib->color_table = NULL; - if(free_bits) - { - HeapFree(GetProcessHeap(), 0, dib->bits); - dib->bits = NULL; - } + + HeapFree(GetProcessHeap(), 0, dib->ptr_to_free); + dib->ptr_to_free = NULL; + dib->bits = NULL; } void copy_dib_color_info(dib_info *dst, const dib_info *src) @@ -254,7 +255,7 @@ BOOL convert_dib(dib_info *dst, const dib_info *src) dst->height = src->height; dst->width = src->width; dst->stride = ((dst->width * dst->bit_count + 31) >> 3) & ~3; - dst->bits = HeapAlloc(GetProcessHeap(), 0, dst->height * dst->stride); + dst->ptr_to_free = dst->bits = HeapAlloc(GetProcessHeap(), 0, dst->height * dst->stride); src_rect.left = src_rect.top = 0; src_rect.right = src->width; @@ -262,7 +263,7 @@ BOOL convert_dib(dib_info *dst, const dib_info *src) ret = dst->funcs->convert_to(dst, src, &src_rect); - if(!ret) free_dib_info(dst, TRUE); + if(!ret) free_dib_info(dst); return ret; } @@ -289,7 +290,7 @@ static BOOL CDECL dibdrv_DeleteDC( PHYSDEV dev ) TRACE("(%p)\n", dev); DeleteObject(pdev->clip); free_pattern_brush(pdev); - free_dib_info(&pdev->dib, FALSE); + free_dib_info(&pdev->dib); return 0; } diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 9fde40a..e142a9b 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -60,7 +60,7 @@ extern void calc_and_xor_masks(INT rop, DWORD color, DWORD *and, DWORD *xor) DEC extern void update_brush_rop( dibdrv_physdev *pdev, INT rop ) DECLSPEC_HIDDEN; extern void reset_dash_origin(dibdrv_physdev *pdev) DECLSPEC_HIDDEN; extern BOOL init_dib_info_from_packed(dib_info *dib, const BITMAPINFOHEADER *bi, WORD usage, HPALETTE pal) DECLSPEC_HIDDEN; -extern void free_dib_info(dib_info *dib, BOOL free_bits) DECLSPEC_HIDDEN; +extern void free_dib_info(dib_info *dib) DECLSPEC_HIDDEN; extern void free_pattern_brush(dibdrv_physdev *pdev) DECLSPEC_HIDDEN; extern void copy_dib_color_info(dib_info *dst, const dib_info *src) DECLSPEC_HIDDEN; extern BOOL convert_dib(dib_info *dst, const dib_info *src) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 69faaeb..1a3e989 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1072,7 +1072,7 @@ static void free_pattern_brush_bits( dibdrv_physdev *pdev ) void free_pattern_brush( dibdrv_physdev *pdev ) { free_pattern_brush_bits( pdev ); - free_dib_info( &pdev->brush_dib, TRUE ); + free_dib_info( &pdev->brush_dib ); } static BOOL create_pattern_brush_bits(dibdrv_physdev *pdev) @@ -1295,7 +1295,7 @@ HBRUSH CDECL dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) pdev->brush_rects = pattern_brush; pdev->defer &= ~DEFER_BRUSH; } - free_dib_info(&orig_dib, FALSE); + free_dib_info(&orig_dib); } GlobalUnlock((HGLOBAL)logbrush.lbHatch); break; diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 2d8ea5d..c5ff4ba 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -78,6 +78,7 @@ typedef struct int bit_count, width, height; int stride; /* stride in bytes. Will be -ve for bottom-up dibs (see bits). */ void *bits; /* points to the top-left corner of the dib. */ + void *ptr_to_free; DWORD red_mask, green_mask, blue_mask; int red_shift, green_shift, blue_shift;
1
0
0
0
Huw Davies : gdi32: Use a local copy of the bitmap info structure to further simplify GetDIBits .
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: dd39da49e5de78e25fa237ca29ff5b13a3dfbe56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd39da49e5de78e25fa237ca2…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jul 12 16:10:50 2011 +0100 gdi32: Use a local copy of the bitmap info structure to further simplify GetDIBits. --- dlls/gdi32/dib.c | 190 ++++++++++++++++++++++++++++++++---------------------- 1 files changed, 114 insertions(+), 76 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dd39da49e5de78e25fa23…
1
0
0
0
Huw Davies : gdi32: Don't use a dib-section' s bitfields unless its depth matches the requested depth.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: 74707e956e9c9a3060bbc31447d053820d385a36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74707e956e9c9a3060bbc3144…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jul 12 16:10:49 2011 +0100 gdi32: Don't use a dib-section's bitfields unless its depth matches the requested depth. --- dlls/gdi32/dib.c | 32 ++++++++++---------------------- 1 files changed, 10 insertions(+), 22 deletions(-) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 3268086..5103919 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -439,6 +439,10 @@ static const RGBQUAD DefLogPaletteQuads[20] = { /* Copy of Default Logical Palet { 0xff, 0xff, 0xff, 0x00 } }; +static const DWORD bit_fields_888[3] = {0xff0000, 0x00ff00, 0x0000ff}; +static const DWORD bit_fields_565[3] = {0xf800, 0x07e0, 0x001f}; +static const DWORD bit_fields_555[3] = {0x7c00, 0x03e0, 0x001f}; + /****************************************************************************** * GetDIBits [GDI32.@] * @@ -646,11 +650,7 @@ INT WINAPI GetDIBits( case 15: if (info->bmiHeader.biCompression == BI_BITFIELDS) - { - ((PDWORD)info->bmiColors)[0] = 0x7c00; - ((PDWORD)info->bmiColors)[1] = 0x03e0; - ((PDWORD)info->bmiColors)[2] = 0x001f; - } + memcpy( info->bmiColors, bit_fields_555, sizeof(bit_fields_555) ); break; case 16: @@ -658,21 +658,13 @@ INT WINAPI GetDIBits( { if (bmp->dib) { - if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS) + if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS && bmp->dib->dsBmih.biBitCount == bpp) memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) ); else - { - ((PDWORD)info->bmiColors)[0] = 0x7c00; - ((PDWORD)info->bmiColors)[1] = 0x03e0; - ((PDWORD)info->bmiColors)[2] = 0x001f; - } + memcpy( info->bmiColors, bit_fields_555, sizeof(bit_fields_555) ); } else - { - ((PDWORD)info->bmiColors)[0] = 0xf800; - ((PDWORD)info->bmiColors)[1] = 0x07e0; - ((PDWORD)info->bmiColors)[2] = 0x001f; - } + memcpy( info->bmiColors, bit_fields_565, sizeof(bit_fields_565) ); } break; @@ -680,14 +672,10 @@ INT WINAPI GetDIBits( case 32: if (info->bmiHeader.biCompression == BI_BITFIELDS) { - if (bmp->dib && bmp->dib->dsBmih.biCompression == BI_BITFIELDS) + if (bmp->dib && bmp->dib->dsBmih.biCompression == BI_BITFIELDS && bmp->dib->dsBmih.biBitCount == bpp) memcpy( info->bmiColors, bmp->dib->dsBitfields, 3 * sizeof(DWORD) ); else - { - ((PDWORD)info->bmiColors)[0] = 0xff0000; - ((PDWORD)info->bmiColors)[1] = 0x00ff00; - ((PDWORD)info->bmiColors)[2] = 0x0000ff; - } + memcpy( info->bmiColors, bit_fields_888, sizeof(bit_fields_888) ); } break; }
1
0
0
0
Francois Gouget : d3dx9_36: Use copysignf() instead of signbit().
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: a369b2bd630cbeaddc94b5b4078e38e5e285ff6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a369b2bd630cbeaddc94b5b40…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jul 12 14:23:38 2011 +0200 d3dx9_36: Use copysignf() instead of signbit(). --- dlls/d3dx9_36/math.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index f13f2fb..481278e 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -1776,7 +1776,7 @@ static inline unsigned short float_32_to_16(const float in) { int exp = 0, origexp; float tmp = fabs(in); - int sign = signbit(in); + int sign = (copysignf(1, in) < 0); unsigned int mantissa; unsigned short ret;
1
0
0
0
Jacek Caban : d3d10effect.h: Added missing D3D10_EFFECT_* flags.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: 7379f31e4b7e7b1d5249815ff4e4a8819ee9d1a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7379f31e4b7e7b1d5249815ff…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 12 14:15:08 2011 +0200 d3d10effect.h: Added missing D3D10_EFFECT_* flags. --- include/d3d10effect.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/d3d10effect.h b/include/d3d10effect.h index e020583..772d424 100644 --- a/include/d3d10effect.h +++ b/include/d3d10effect.h @@ -127,6 +127,10 @@ typedef struct _D3D10_PASS_SHADER_DESC UINT ShaderIndex; } D3D10_PASS_SHADER_DESC; +#define D3D10_EFFECT_COMPILE_CHILD_EFFECT 0x0001 +#define D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS 0x0002 +#define D3D10_EFFECT_SINGLE_THREADED 0x0008 + DEFINE_GUID(IID_ID3D10EffectType, 0x4e9e1ddc, 0xcd9d, 0x4772, 0xa8, 0x37, 0x00, 0x18, 0x0b, 0x9b, 0x88, 0xfd); #define INTERFACE ID3D10EffectType
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10InputLayout iface.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: 3808a6f37112b044796ab7548331a97ae0ec5e3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3808a6f37112b044796ab7548…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 12 12:51:54 2011 +0200 d3d10core: COM cleanup for the ID3D10InputLayout iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/inputlayout.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 2fb21a5..21e2e95 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -155,7 +155,7 @@ HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view) /* ID3D10InputLayout */ struct d3d10_input_layout { - const struct ID3D10InputLayoutVtbl *vtbl; + ID3D10InputLayout ID3D10InputLayout_iface; LONG refcount; struct wined3d_vertex_declaration *wined3d_decl; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index e4916bc..698c1ec 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -848,7 +848,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateInputLayout(ID3D10Device *if } TRACE("Created input layout %p.\n", object); - *input_layout = (ID3D10InputLayout *)object; + *input_layout = &object->ID3D10InputLayout_iface; return S_OK; } diff --git a/dlls/d3d10core/inputlayout.c b/dlls/d3d10core/inputlayout.c index d41a9cf..7bf67f6 100644 --- a/dlls/d3d10core/inputlayout.c +++ b/dlls/d3d10core/inputlayout.c @@ -103,7 +103,7 @@ static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEME static inline struct d3d10_input_layout *impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) { - return CONTAINING_RECORD(iface, struct d3d10_input_layout, vtbl); + return CONTAINING_RECORD(iface, struct d3d10_input_layout, ID3D10InputLayout_iface); } /* IUnknown methods */ @@ -130,7 +130,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_input_layout_QueryInterface(ID3D10InputLa static ULONG STDMETHODCALLTYPE d3d10_input_layout_AddRef(ID3D10InputLayout *iface) { - struct d3d10_input_layout *This = (struct d3d10_input_layout *)iface; + struct d3d10_input_layout *This = impl_from_ID3D10InputLayout(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u\n", This, refcount); @@ -145,7 +145,7 @@ static ULONG STDMETHODCALLTYPE d3d10_input_layout_AddRef(ID3D10InputLayout *ifac static ULONG STDMETHODCALLTYPE d3d10_input_layout_Release(ID3D10InputLayout *iface) { - struct d3d10_input_layout *This = (struct d3d10_input_layout *)iface; + struct d3d10_input_layout *This = impl_from_ID3D10InputLayout(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u\n", This, refcount); @@ -222,7 +222,7 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_ UINT wined3d_element_count; HRESULT hr; - layout->vtbl = &d3d10_input_layout_vtbl; + layout->ID3D10InputLayout_iface.lpVtbl = &d3d10_input_layout_vtbl; layout->refcount = 1; hr = d3d10_input_layout_to_wined3d_declaration(element_descs, element_count,
1
0
0
0
Michael Stefaniuc : d3d10core: Use unsafe_impl_from_ID3D10InputLayout for an app provided iface.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: 6c866e06bfe24c37f7d53aa5adc3aed83819b2b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c866e06bfe24c37f7d53aa5a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 12 12:50:41 2011 +0200 d3d10core: Use unsafe_impl_from_ID3D10InputLayout for an app provided iface. --- dlls/d3d10core/d3d10core_private.h | 1 + dlls/d3d10core/device.c | 3 ++- dlls/d3d10core/inputlayout.c | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 16cc17c..2fb21a5 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -164,6 +164,7 @@ struct d3d10_input_layout HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_device *device, const D3D10_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code, SIZE_T shader_byte_code_length) DECLSPEC_HIDDEN; +struct d3d10_input_layout *unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) DECLSPEC_HIDDEN; /* ID3D10VertexShader */ struct d3d10_vertex_shader diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 239f79a..e4916bc 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -192,11 +192,12 @@ static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device *iface, ID3D10InputLayout *input_layout) { struct d3d10_device *This = impl_from_ID3D10Device(iface); + struct d3d10_input_layout *layout = unsafe_impl_from_ID3D10InputLayout(input_layout); TRACE("iface %p, input_layout %p\n", iface, input_layout); wined3d_device_set_vertex_declaration(This->wined3d_device, - input_layout ? ((struct d3d10_input_layout *)input_layout)->wined3d_decl : NULL); + layout ? layout->wined3d_decl : NULL); } static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device *iface, UINT start_slot, diff --git a/dlls/d3d10core/inputlayout.c b/dlls/d3d10core/inputlayout.c index f224559..d41a9cf 100644 --- a/dlls/d3d10core/inputlayout.c +++ b/dlls/d3d10core/inputlayout.c @@ -19,6 +19,7 @@ #include "config.h" #include "wine/port.h" +#include <assert.h> #include "d3d10core_private.h" @@ -100,6 +101,11 @@ static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEME return S_OK; } +static inline struct d3d10_input_layout *impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_input_layout, vtbl); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_input_layout_QueryInterface(ID3D10InputLayout *iface, @@ -238,3 +244,12 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_ return S_OK; } + +struct d3d10_input_layout *unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface) +{ + if (!iface) + return NULL; + assert(iface->lpVtbl == &d3d10_input_layout_vtbl); + + return impl_from_ID3D10InputLayout(iface); +}
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10RenderTargetView iface.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: dc3ee8b94716e8f17e8b0b67f369b7de607a4c62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc3ee8b94716e8f17e8b0b67f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 12 12:37:59 2011 +0200 d3d10core: COM cleanup for the ID3D10RenderTargetView iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/view.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index c53a61b..16cc17c 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -132,7 +132,7 @@ HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) DECLS /* ID3D10RenderTargetView */ struct d3d10_rendertarget_view { - const struct ID3D10RenderTargetViewVtbl *vtbl; + ID3D10RenderTargetView ID3D10RenderTargetView_iface; LONG refcount; struct wined3d_rendertarget_view *wined3d_view; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 1609baf..239f79a 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -782,7 +782,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Devic } TRACE("Created rendertarget view %p.\n", object); - *view = (ID3D10RenderTargetView *)object; + *view = &object->ID3D10RenderTargetView_iface; return S_OK; } diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index 75cb4b5..57c4148 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -294,7 +294,7 @@ HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) static inline struct d3d10_rendertarget_view *impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface) { - return CONTAINING_RECORD(iface, struct d3d10_rendertarget_view, vtbl); + return CONTAINING_RECORD(iface, struct d3d10_rendertarget_view, ID3D10RenderTargetView_iface); } /* IUnknown methods */ @@ -322,7 +322,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_QueryInterface(ID3D10Re static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef(ID3D10RenderTargetView *iface) { - struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface; + struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u\n", This, refcount); @@ -332,7 +332,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef(ID3D10RenderTarget static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTargetView *iface) { - struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface; + struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u\n", This, refcount); @@ -384,7 +384,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTargetView *iface, ID3D10Resource **resource) { - struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface; + struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface); struct wined3d_resource *wined3d_resource; IUnknown *parent; HRESULT hr; @@ -414,7 +414,7 @@ static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTa static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDesc(ID3D10RenderTargetView *iface, D3D10_RENDER_TARGET_VIEW_DESC *desc) { - struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface; + struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface); TRACE("iface %p, desc %p\n", iface, desc); @@ -444,7 +444,7 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, struct wined3d_resource *wined3d_resource; HRESULT hr; - view->vtbl = &d3d10_rendertarget_view_vtbl; + view->ID3D10RenderTargetView_iface.lpVtbl = &d3d10_rendertarget_view_vtbl; view->refcount = 1; if (!desc)
1
0
0
0
Michael Stefaniuc : d3d10core: Use unsafe_impl_from_ID3D10RenderTargetView for app provided ifaces.
by Alexandre Julliard
12 Jul '11
12 Jul '11
Module: wine Branch: master Commit: 0b78866a0f7dedbb37d4db510d80ea4ec50a3936 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b78866a0f7dedbb37d4db510…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 12 12:34:22 2011 +0200 d3d10core: Use unsafe_impl_from_ID3D10RenderTargetView for app provided ifaces. --- dlls/d3d10core/d3d10core_private.h | 1 + dlls/d3d10core/device.c | 5 ++--- dlls/d3d10core/view.c | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 457ba09..c53a61b 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -141,6 +141,7 @@ struct d3d10_rendertarget_view HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, ID3D10Resource *resource, const D3D10_RENDER_TARGET_VIEW_DESC *desc) DECLSPEC_HIDDEN; +struct d3d10_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface) DECLSPEC_HIDDEN; /* ID3D10ShaderResourceView */ struct d3d10_shader_resource_view diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 4df04f1..1609baf 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -383,14 +383,13 @@ static void STDMETHODCALLTYPE d3d10_device_ClearRenderTargetView(ID3D10Device *i ID3D10RenderTargetView *render_target_view, const FLOAT color_rgba[4]) { struct d3d10_device *This = impl_from_ID3D10Device(iface); - struct wined3d_rendertarget_view *wined3d_view; + struct d3d10_rendertarget_view *view = unsafe_impl_from_ID3D10RenderTargetView(render_target_view); const WINED3DCOLORVALUE color = {color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]}; TRACE("iface %p, render_target_view %p, color_rgba [%f %f %f %f]\n", iface, render_target_view, color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]); - wined3d_view = ((struct d3d10_rendertarget_view *)render_target_view)->wined3d_view; - wined3d_device_clear_rendertarget_view(This->wined3d_device, wined3d_view, &color); + wined3d_device_clear_rendertarget_view(This->wined3d_device, view->wined3d_view, &color); } static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device *iface, diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index fb289a6..75cb4b5 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -19,6 +19,7 @@ #include "config.h" #include "wine/port.h" +#include <assert.h> #define NONAMELESSUNION #include "d3d10core_private.h" @@ -291,6 +292,11 @@ HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) return S_OK; } +static inline struct d3d10_rendertarget_view *impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_rendertarget_view, vtbl); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_QueryInterface(ID3D10RenderTargetView *iface, @@ -468,6 +474,15 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, return S_OK; } +struct d3d10_rendertarget_view *unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface) +{ + if (!iface) + return NULL; + assert(iface->lpVtbl == &d3d10_rendertarget_view_vtbl); + + return impl_from_ID3D10RenderTargetView(iface); +} + static inline struct d3d10_shader_resource_view *impl_from_ID3D10ShaderResourceView(ID3D10ShaderResourceView *iface) { return CONTAINING_RECORD(iface, struct d3d10_shader_resource_view, ID3D10ShaderResourceView_iface);
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
84
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200