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
December 2012
----- 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
549 discussions
Start a n
N
ew thread
Andrew Talbot : comctl32: Remove unneeded address-of operators from array names.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: da715453194c7295bf2d7d1460f870e6bd8a42b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da715453194c7295bf2d7d146…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Dec 5 22:42:28 2012 +0000 comctl32: Remove unneeded address-of operators from array names. --- dlls/comctl32/datetime.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index d36032f..748e0fc 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -178,7 +178,7 @@ static BOOL DATETIME_IsDateInValidRange(const DATETIME_INFO *infoPtr, const SYST (MONTHCAL_CompareSystemTime(date, &min_allowed_date) == -1)) return FALSE; - limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM) &range); + limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM)range); if (limits & GDTR_MAX) { @@ -585,7 +585,7 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta) } /* Ensure time is within bounds */ - limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM) &range); + limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM)range); min = delta < 0; if (limits & (min ? GDTR_MIN : GDTR_MAX))
1
0
0
0
Andrew Talbot : gdiplus: Remove unneeded address-of operator from array name.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: e4351708d5579d6590e4e5a384b9cdb2073b48f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4351708d5579d6590e4e5a38…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Dec 5 22:42:32 2012 +0000 gdiplus: Remove unneeded address-of operator from array name. --- dlls/gdiplus/graphics.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 8cec80d..e5678a7 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -465,7 +465,7 @@ static GpStatus alpha_blend_pixels_hrgn(GpGraphics *graphics, INT dst_x, INT dst GetRegionData(hrgn, size, rgndata); - rects = (RECT*)&rgndata->Buffer; + rects = (RECT*)rgndata->Buffer; for (i=0; stat == Ok && i<rgndata->rdh.nCount; i++) {
1
0
0
0
Andrew Talbot : hhctrl.ocx: Remove unneeded address-of operators from array names.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: 896cc71d24bad3f5063ec876fb72b965caab3ff8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=896cc71d24bad3f5063ec876f…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Dec 5 22:42:37 2012 +0000 hhctrl.ocx: Remove unneeded address-of operators from array names. --- dlls/hhctrl.ocx/chm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index e3f2a44..641fe95 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -280,7 +280,7 @@ void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override) if (merge & HHWIN_PARAM_TB_FLAGS) dst->fsToolBarFlags = src->fsToolBarFlags; if (merge & HHWIN_PARAM_EXPANSION) dst->fNotExpanded = src->fNotExpanded; if (merge & HHWIN_PARAM_TABPOS) dst->tabpos = src->tabpos; - if (merge & HHWIN_PARAM_TABORDER) memcpy(&dst->tabOrder, &src->tabOrder, sizeof(src->tabOrder)); + if (merge & HHWIN_PARAM_TABORDER) memcpy(dst->tabOrder, src->tabOrder, sizeof(src->tabOrder)); if (merge & HHWIN_PARAM_HISTORY_COUNT) dst->cHistory = src->cHistory; if (merge & HHWIN_PARAM_CUR_TAB) dst->curNavType = src->curNavType;
1
0
0
0
Vincent Povirk : gdiplus: Fix graphics bounds for memory DC's.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: ba4ef584d70e05a765a5a8cffc95ce0d04c34859 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba4ef584d70e05a765a5a8cff…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Dec 5 14:11:25 2012 -0600 gdiplus: Fix graphics bounds for memory DC's. --- dlls/gdiplus/graphics.c | 19 +++++++++++++++++++ dlls/gdiplus/tests/graphics.c | 8 ++++++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4474db6..8cec80d 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2113,6 +2113,25 @@ static GpStatus get_graphics_bounds(GpGraphics* graphics, GpRectF* rect) stat = GdipGetImageBounds(graphics->image, rect, &unit); if (stat == Ok && unit != UnitPixel) FIXME("need to convert from unit %i\n", unit); + }else if (GetObjectType(graphics->hdc) == OBJ_MEMDC){ + HBITMAP hbmp; + BITMAP bmp; + + rect->X = 0; + rect->Y = 0; + + hbmp = GetCurrentObject(graphics->hdc, OBJ_BITMAP); + if (hbmp && GetObjectW(hbmp, sizeof(bmp), &bmp)) + { + rect->Width = bmp.bmWidth; + rect->Height = bmp.bmHeight; + } + else + { + /* FIXME: ??? */ + rect->Width = 1; + rect->Height = 1; + } }else{ rect->X = 0; rect->Y = 0; diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index f4e7ffa..42612dd 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -4091,6 +4091,7 @@ static void test_alpha_hdc(void) GpGraphics *graphics; ULONG *bits; BITMAPINFO bmi; + GpRectF bounds; hdc = CreateCompatibleDC(0); ok(hdc != NULL, "CreateCompatibleDC failed\n"); @@ -4110,6 +4111,13 @@ static void test_alpha_hdc(void) status = GdipCreateFromHDC(hdc, &graphics); expect(Ok, status); + status = GdipGetVisibleClipBounds(graphics, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf(5.0, bounds.Width); + expectf(5.0, bounds.Height); + bits[0] = 0xdeadbeef; status = GdipGraphicsClear(graphics, 0xffaaaaaa);
1
0
0
0
Vincent Povirk : gdiplus: Always use AlphaBlend to draw to 32-bit DIB's.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: 81d9ffa041129a9394e05ccdb564d7149884135b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81d9ffa041129a9394e05ccdb…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Dec 5 13:15:25 2012 -0600 gdiplus: Always use AlphaBlend to draw to 32-bit DIB's. --- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/graphics.c | 19 ++++++++++++++----- dlls/gdiplus/tests/graphics.c | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 4a8b10a..cb7330e 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -152,6 +152,7 @@ struct GpGraphics{ HDC hdc; HWND hwnd; BOOL owndc; + BOOL alpha_hdc; GpImage *image; SmoothingMode smoothing; CompositingQuality compqual; diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 247b17d..4474db6 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2250,6 +2250,8 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics) GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **graphics) { GpStatus retval; + HBITMAP hbitmap; + DIBSECTION dib; TRACE("(%p, %p, %p)\n", hdc, hDevice, graphics); @@ -2274,6 +2276,13 @@ GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **gra return retval; } + hbitmap = GetCurrentObject(hdc, OBJ_BITMAP); + if (hbitmap && GetObjectW(hbitmap, sizeof(dib), &dib) == sizeof(dib) && + dib.dsBmih.biBitCount == 32 && dib.dsBmih.biCompression == BI_RGB) + { + (*graphics)->alpha_hdc = 1; + } + (*graphics)->hdc = hdc; (*graphics)->hwnd = WindowFromDC(hdc); (*graphics)->owndc = FALSE; @@ -3157,7 +3166,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image graphics->scale, image->xres, image->yres, bitmap->format, imageAttributes ? imageAttributes->outside_color : 0); - if (imageAttributes || + if (imageAttributes || graphics->alpha_hdc || (graphics->image && graphics->image->type == ImageTypeBitmap) || ptf[1].Y != ptf[0].Y || ptf[2].X != ptf[0].X || ptf[1].X - ptf[0].X != srcwidth || ptf[2].Y - ptf[0].Y != srcheight || @@ -4021,7 +4030,7 @@ GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *p if(graphics->busy) return ObjectBusy; - if (!graphics->image) + if (!graphics->image && !graphics->alpha_hdc) stat = GDI32_GdipFillPath(graphics, brush, path); if (stat == NotImplemented) @@ -4359,7 +4368,7 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, if(graphics->busy) return ObjectBusy; - if (!graphics->image) + if (!graphics->image && !graphics->alpha_hdc) stat = GDI32_GdipFillRegion(graphics, brush, region); if (stat == NotImplemented) @@ -5982,7 +5991,7 @@ GpStatus WINGDIPAPI GdipGetDC(GpGraphics *graphics, HDC *hdc) { stat = METAFILE_GetDC((GpMetafile*)graphics->image, hdc); } - else if (!graphics->hdc || + else if (!graphics->hdc || graphics->alpha_hdc || (graphics->image && graphics->image->type == ImageTypeBitmap && ((GpBitmap*)graphics->image)->format & PixelFormatAlpha)) { /* Create a fake HDC and fill it with a constant color. */ @@ -6626,7 +6635,7 @@ static GpStatus draw_driver_string(GpGraphics *graphics, GDIPCONST UINT16 *text, if (length == -1) length = strlenW(text); - if (graphics->hdc && + if (graphics->hdc && !graphics->alpha_hdc && ((flags & DriverStringOptionsRealizedAdvance) || length <= 1) && brush->bt == BrushTypeSolidColor && (((GpSolidFill*)brush)->color & 0xff000000) == 0xff000000) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 553e77f..f4e7ffa 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -4115,7 +4115,7 @@ static void test_alpha_hdc(void) status = GdipGraphicsClear(graphics, 0xffaaaaaa); expect(Ok, status); - todo_wine expect(0xffaaaaaa, bits[0]); + expect(0xffaaaaaa, bits[0]); SelectObject(hdc, old_hbm);
1
0
0
0
Vincent Povirk : gdiplus: Use one GetDIBits call instead of one per row.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: 431aa5bc3f4d81b15d95abcd0ed4da6ac15bf8af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=431aa5bc3f4d81b15d95abcd0…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Dec 5 10:42:49 2012 -0600 gdiplus: Use one GetDIBits call instead of one per row. --- dlls/gdiplus/image.c | 26 +++----------------------- 1 files changed, 3 insertions(+), 23 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index a8f43e3..9d88629 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -4645,7 +4645,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi GpStatus retval; PixelFormat format; BitmapData lockeddata; - INT y; TRACE("%p %p %p\n", hbm, hpal, bitmap); @@ -4695,14 +4694,10 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi if (retval == Ok) { HDC hdc; - HBITMAP oldhbm; BITMAPINFO *pbmi; - INT src_height, dst_stride; - BYTE *dst_bits; + INT src_height; hdc = CreateCompatibleDC(NULL); - oldhbm = SelectObject(hdc, hbm); - pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); if (pbmi) @@ -4713,30 +4708,15 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi GetDIBits(hdc, hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); src_height = abs(pbmi->bmiHeader.biHeight); + pbmi->bmiHeader.biHeight = -src_height; - if (pbmi->bmiHeader.biHeight > 0) - { - dst_bits = (BYTE*)lockeddata.Scan0+lockeddata.Stride*(src_height-1); - dst_stride = -lockeddata.Stride; - } - else - { - dst_bits = lockeddata.Scan0; - dst_stride = lockeddata.Stride; - } - - for (y=0; y<src_height; y++) - { - GetDIBits(hdc, hbm, y, 1, dst_bits+dst_stride*y, - pbmi, DIB_RGB_COLORS); - } + GetDIBits(hdc, hbm, 0, src_height, lockeddata.Scan0, pbmi, DIB_RGB_COLORS); GdipFree(pbmi); } else retval = OutOfMemory; - SelectObject(hdc, oldhbm); DeleteDC(hdc); GdipBitmapUnlockBits(*bitmap, &lockeddata);
1
0
0
0
Vincent Povirk : gdiplus: Avoid accessing dib bits directly in GdipCreateBitmapFromHBITMAP.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: 04412f7a74fb2a915584de080dab9190f0edc414 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04412f7a74fb2a915584de080…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Dec 5 10:36:40 2012 -0600 gdiplus: Avoid accessing dib bits directly in GdipCreateBitmapFromHBITMAP. --- dlls/gdiplus/image.c | 80 +++++++++++++++++++++---------------------------- 1 files changed, 34 insertions(+), 46 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 73f08b9..a8f43e3 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -4694,62 +4694,50 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi format, &lockeddata); if (retval == Ok) { - if (bm.bmBits) - { - for (y=0; y<bm.bmHeight; y++) - { - memcpy((BYTE*)lockeddata.Scan0+lockeddata.Stride*y, - (BYTE*)bm.bmBits+bm.bmWidthBytes*(bm.bmHeight-1-y), - bm.bmWidthBytes); - } - } - else - { - HDC hdc; - HBITMAP oldhbm; - BITMAPINFO *pbmi; - INT src_height, dst_stride; - BYTE *dst_bits; + HDC hdc; + HBITMAP oldhbm; + BITMAPINFO *pbmi; + INT src_height, dst_stride; + BYTE *dst_bits; - hdc = CreateCompatibleDC(NULL); - oldhbm = SelectObject(hdc, hbm); + hdc = CreateCompatibleDC(NULL); + oldhbm = SelectObject(hdc, hbm); - pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); + pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); - if (pbmi) - { - pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbmi->bmiHeader.biBitCount = 0; - - GetDIBits(hdc, hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); - - src_height = abs(pbmi->bmiHeader.biHeight); + if (pbmi) + { + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biBitCount = 0; - if (pbmi->bmiHeader.biHeight > 0) - { - dst_bits = (BYTE*)lockeddata.Scan0+lockeddata.Stride*(src_height-1); - dst_stride = -lockeddata.Stride; - } - else - { - dst_bits = lockeddata.Scan0; - dst_stride = lockeddata.Stride; - } + GetDIBits(hdc, hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); - for (y=0; y<src_height; y++) - { - GetDIBits(hdc, hbm, y, 1, dst_bits+dst_stride*y, - pbmi, DIB_RGB_COLORS); - } + src_height = abs(pbmi->bmiHeader.biHeight); - GdipFree(pbmi); + if (pbmi->bmiHeader.biHeight > 0) + { + dst_bits = (BYTE*)lockeddata.Scan0+lockeddata.Stride*(src_height-1); + dst_stride = -lockeddata.Stride; } else - retval = OutOfMemory; + { + dst_bits = lockeddata.Scan0; + dst_stride = lockeddata.Stride; + } + + for (y=0; y<src_height; y++) + { + GetDIBits(hdc, hbm, y, 1, dst_bits+dst_stride*y, + pbmi, DIB_RGB_COLORS); + } - SelectObject(hdc, oldhbm); - DeleteDC(hdc); + GdipFree(pbmi); } + else + retval = OutOfMemory; + + SelectObject(hdc, oldhbm); + DeleteDC(hdc); GdipBitmapUnlockBits(*bitmap, &lockeddata); }
1
0
0
0
Henri Verbeet : d3d10core: Implement d3d10_device_VSGetSamplers().
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: c98767a425e361fbf646a1947d42c411905fb633 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c98767a425e361fbf646a1947…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Dec 5 21:01:48 2012 +0100 d3d10core: Implement d3d10_device_VSGetSamplers(). --- dlls/d3d10core/device.c | 21 ++++++++++++++++++++- dlls/wined3d/device.c | 13 +++++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 4 files changed, 35 insertions(+), 1 deletions(-) diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 1a75ee5..ad07aee 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -772,8 +772,27 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetShaderResources(ID3D10Device *if static void STDMETHODCALLTYPE d3d10_device_VSGetSamplers(ID3D10Device *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers) { - FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n", + struct d3d10_device *device = impl_from_ID3D10Device(iface); + unsigned int i; + + TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers); + + for (i = 0; i < sampler_count; ++i) + { + struct d3d10_sampler_state *sampler_impl; + struct wined3d_sampler *wined3d_sampler; + + if (!(wined3d_sampler = wined3d_device_get_vs_sampler(device->wined3d_device, start_slot + i))) + { + samplers[i] = NULL; + continue; + } + + sampler_impl = wined3d_sampler_get_parent(wined3d_sampler); + samplers[i] = &sampler_impl->ID3D10SamplerState_iface; + ID3D10SamplerState_AddRef(samplers[i]); + } } static void STDMETHODCALLTYPE d3d10_device_GetPredication(ID3D10Device *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d0c3638..24c6b4e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2605,6 +2605,19 @@ void CDECL wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx wined3d_sampler_decref(prev); } +struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3d_device *device, UINT idx) +{ + TRACE("device %p, idx %u.\n", device, idx); + + if (idx >= MAX_SAMPLER_OBJECTS) + { + WARN("Invalid sampler index %u.\n", idx); + return NULL; + } + + return device->stateBlock->state.vs_sampler[idx]; +} + HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, UINT start_register, const BOOL *constants, UINT bool_count) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 29d6740..0b87f10 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -100,6 +100,7 @@ @ cdecl wined3d_device_get_vs_consts_b(ptr long ptr long) @ cdecl wined3d_device_get_vs_consts_f(ptr long ptr long) @ cdecl wined3d_device_get_vs_consts_i(ptr long ptr long) +@ cdecl wined3d_device_get_vs_sampler(ptr long) @ cdecl wined3d_device_incref(ptr) @ cdecl wined3d_device_init_3d(ptr ptr) @ cdecl wined3d_device_init_gdi(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 90fb8de..cc60893 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2180,6 +2180,7 @@ HRESULT __cdecl wined3d_device_get_vs_consts_f(const struct wined3d_device *devi UINT start_register, float *constants, UINT vector4f_count); HRESULT __cdecl wined3d_device_get_vs_consts_i(const struct wined3d_device *device, UINT start_register, int *constants, UINT vector4i_count); +struct wined3d_sampler * __cdecl wined3d_device_get_vs_sampler(const struct wined3d_device *device, UINT idx); ULONG __cdecl wined3d_device_incref(struct wined3d_device *device); HRESULT __cdecl wined3d_device_init_3d(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc); HRESULT __cdecl wined3d_device_init_gdi(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc);
1
0
0
0
Henri Verbeet : d3d10core: Implement d3d10_device_VSSetSamplers().
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: e5805c316c4ed105528ec508ef4c624bc2060795 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5805c316c4ed105528ec508e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Dec 5 21:01:47 2012 +0100 d3d10core: Implement d3d10_device_VSSetSamplers(). --- dlls/d3d10core/d3d10core_private.h | 3 + dlls/d3d10core/device.c | 13 +++++- dlls/d3d10core/state.c | 18 ++++++++ dlls/wined3d/Makefile.in | 1 + dlls/wined3d/device.c | 21 +++++++++ dlls/wined3d/sampler.c | 79 ++++++++++++++++++++++++++++++++++++ dlls/wined3d/stateblock.c | 10 +++++ dlls/wined3d/wined3d.spec | 6 +++ dlls/wined3d/wined3d_private.h | 8 ++++ include/wine/wined3d.h | 7 +++ 10 files changed, 165 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e5805c316c4ed105528ec…
1
0
0
0
Henri Verbeet : ddraw: Avoid LPDDCOLORKEY.
by Alexandre Julliard
06 Dec '12
06 Dec '12
Module: wine Branch: master Commit: 71db6fd2854987847a3bb4037338b61d11970f4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71db6fd2854987847a3bb4037…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Dec 5 21:01:46 2012 +0100 ddraw: Avoid LPDDCOLORKEY. --- include/ddraw.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/ddraw.h b/include/ddraw.h index 9416951..25ea77e 100644 --- a/include/ddraw.h +++ b/include/ddraw.h @@ -1886,7 +1886,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown) /*34*/ STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; /*38*/ STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE; /*3c*/ STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE; -/*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; +/*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; /*44*/ STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; /*48*/ STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; /*4c*/ STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; @@ -1899,7 +1899,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown) /*68*/ STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; /*6c*/ STDMETHOD(Restore)(THIS) PURE; /*70*/ STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE; -/*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; +/*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; /*78*/ STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; /*7c*/ STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE; /*80*/ STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE; @@ -2020,7 +2020,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown) STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE; STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; @@ -2033,7 +2033,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown) STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; STDMETHOD(Restore)(THIS) PURE; STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE; STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE; @@ -2166,7 +2166,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown) STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps)(THIS_ DDSCAPS *caps) PURE; STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; @@ -2179,7 +2179,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown) STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; STDMETHOD(Restore)(THIS) PURE; STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE; STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE; @@ -2317,7 +2317,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown) STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE; STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; @@ -2330,7 +2330,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown) STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; STDMETHOD(Restore)(THIS) PURE; STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE; STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE; @@ -2484,7 +2484,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown) STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps)(THIS_ DDSCAPS2 *caps) PURE; STDMETHOD(GetClipper)(THIS_ IDirectDrawClipper **clipper) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; @@ -2497,7 +2497,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown) STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; STDMETHOD(Restore)(THIS) PURE; STDMETHOD(SetClipper)(THIS_ IDirectDrawClipper *clipper) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD flags, DDCOLORKEY *color_key) PURE; STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette)(THIS_ IDirectDrawPalette *palette) PURE; STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
55
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
Results per page:
10
25
50
100
200