From 973f8a86c5421b14a79f992024f3a3e69716b3f1 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 29 Jul 2008 13:16:00 +0100 Subject: [PATCH] winedib.drv: Implement PatBlt. --- dlls/winedib.drv/dibeng.h | 1 + dlls/winedib.drv/graphics.c | 38 ++++ dlls/winedib.drv/tests/dib.c | 448 ++++++++++++++++++++++++++++++++++++++ dlls/winedib.drv/winedib.drv.spec | 1 + 4 files changed, 488 insertions(+) diff --git a/dlls/winedib.drv/dibeng.h b/dlls/winedib.drv/dibeng.h index efcd5a7cfef..f8a7715645d 100644 --- a/dlls/winedib.drv/dibeng.h +++ b/dlls/winedib.drv/dibeng.h @@ -96,6 +96,7 @@ extern BOOL DIBENG_CreateBitmap( dibeng_pdevice_t *pdev, HBITMAP hbitmap, LPVOID extern BOOL DIBENG_CreateDC( HDC hdc, dibeng_pdevice_t **pdev, LPCWSTR driver, LPCWSTR device, LPCWSTR output, const DEVMODEW* initData ); extern BOOL DIBENG_LineTo(dibeng_pdevice_t *pdev, INT x, INT y); +extern BOOL DIBENG_PatBlt(dibeng_pdevice_t *pdev, INT left, INT top, INT width, INT height, DWORD rop); extern BOOL DIBENG_Rectangle(dibeng_pdevice_t *pdev, INT left, INT top, INT right, INT bottom); extern HBITMAP DIBENG_SelectBitmap( dibeng_pdevice_t *pdev, HBITMAP hbitmap ); extern HBRUSH DIBENG_SelectBrush( dibeng_pdevice_t *pdev, HBRUSH hbrush ); diff --git a/dlls/winedib.drv/graphics.c b/dlls/winedib.drv/graphics.c index d912881d5fd..21ffbffad4c 100644 --- a/dlls/winedib.drv/graphics.c +++ b/dlls/winedib.drv/graphics.c @@ -80,3 +80,41 @@ BOOL DIBENG_Rectangle(dibeng_pdevice_t *pdev, INT left, INT top, INT right, INT return TRUE; } + +static inline BOOL rop_uses_src(DWORD rop) +{ + return (((rop & 0xcc0000) >> 2) != (rop & 0x330000)); +} + +/*********************************************************************** + * get_rop2_from_rop + * + * Returns the binary rop that is equivalent to the provided ternary rop + * if the src bits are ignored. + */ +static inline DWORD get_rop2_from_rop(DWORD rop) +{ + return (((rop >> 18) & 0x0c) | ((rop >> 16) & 0x03)) + 1; +} + +/*********************************************************************** + * PatBlt + */ +BOOL DIBENG_PatBlt(dibeng_pdevice_t *pdev, INT left, INT top, INT width, INT height, DWORD rop) +{ + INT i; + DWORD old_rop2; + + TRACE("%p %d,%d %dx%d %06x\n", pdev, left, top, width, height, rop); + + if(rop_uses_src(rop)) return FALSE; + + old_rop2 = SetROP2(pdev->hdc, get_rop2_from_rop(rop)); + + for (i = 0; i < height; i++) + pdev->brush_hline(pdev, left, left + width, top + i); + + SetROP2(pdev->hdc, old_rop2); + + return TRUE; +} diff --git a/dlls/winedib.drv/tests/dib.c b/dlls/winedib.drv/tests/dib.c index f5aa16e53d5..d7f92284c95 100644 --- a/dlls/winedib.drv/tests/dib.c +++ b/dlls/winedib.drv/tests/dib.c @@ -30,6 +30,266 @@ static HCRYPTPROV crypt_prov; +static const DWORD rop3[256] = +{ + 0x00000042, /* 0 BLACKNESS */ + 0x00010289, /* DPSoon */ + 0x00020C89, /* DPSona */ + 0x000300AA, /* PSon */ + 0x00040C88, /* SDPona */ + 0x000500A9, /* DPon */ + 0x00060865, /* PDSxnon */ + 0x000702C5, /* PDSaon */ + 0x00080F08, /* SDPnaa */ + 0x00090245, /* PDSxon */ + 0x000A0329, /* DPna */ + 0x000B0B2A, /* PSDnaon */ + 0x000C0324, /* SPna */ + 0x000D0B25, /* PDSnaon */ + 0x000E08A5, /* PDSonon */ + 0x000F0001, /* Pn */ + 0x00100C85, /* PDSona */ + 0x001100A6, /* DSon NOTSRCERASE */ + 0x00120868, /* SDPxnon */ + 0x001302C8, /* SDPaon */ + 0x00140869, /* DPSxnon */ + 0x001502C9, /* DPSaon */ + 0x00165CCA, /* PSDPSanaxx */ + 0x00171D54, /* SSPxDSxaxn */ + 0x00180D59, /* SPxPDxa */ + 0x00191CC8, /* SDPSanaxn */ + 0x001A06C5, /* PDSPaox */ + 0x001B0768, /* SDPSxaxn */ + 0x001C06CA, /* PSDPaox */ + 0x001D0766, /* DSPDxaxn */ + 0x001E01A5, /* PDSox */ + 0x001F0385, /* PDSoan */ + 0x00200F09, /* DPSnaa */ + 0x00210248, /* SDPxon */ + 0x00220326, /* DSna */ + 0x00230B24, /* SPDnaon */ + 0x00240D55, /* SPxDSxa */ + 0x00251CC5, /* PDSPanaxn */ + 0x002606C8, /* SDPSaox */ + 0x00271868, /* SDPSxnox */ + 0x00280369, /* DPSxa */ + 0x002916CA, /* PSDPSaoxxn */ + 0x002A0CC9, /* DPSana */ + 0x002B1D58, /* SSPxPDxaxn */ + 0x002C0784, /* SPDSoax */ + 0x002D060A, /* PSDnox */ + 0x002E064A, /* PSDPxox */ + 0x002F0E2A, /* PSDnoan */ + 0x0030032A, /* PSna */ + 0x00310B28, /* SDPnaon */ + 0x00320688, /* SDPSoox */ + 0x00330008, /* Sn NOTSRCCOPY */ + 0x003406C4, /* SPDSaox */ + 0x00351864, /* SPDSxnox */ + 0x003601A8, /* SDPox */ + 0x00370388, /* SDPoan */ + 0x0038078A, /* PSDPoax */ + 0x00390604, /* SPDnox */ + 0x003A0644, /* SPDSxox */ + 0x003B0E24, /* SPDnoan */ + 0x003C004A, /* PSx */ + 0x003D18A4, /* SPDSonox */ + 0x003E1B24, /* SPDSnaox */ + 0x003F00EA, /* PSan */ + 0x00400F0A, /* PSDnaa */ + 0x00410249, /* DPSxon */ + 0x00420D5D, /* SDxPDxa */ + 0x00431CC4, /* SPDSanaxn */ + 0x00440328, /* SDna SRCERASE */ + 0x00450B29, /* DPSnaon */ + 0x004606C6, /* DSPDaox */ + 0x0047076A, /* PSDPxaxn */ + 0x00480368, /* SDPxa */ + 0x004916C5, /* PDSPDaoxxn */ + 0x004A0789, /* DPSDoax */ + 0x004B0605, /* PDSnox */ + 0x004C0CC8, /* SDPana */ + 0x004D1954, /* SSPxDSxoxn */ + 0x004E0645, /* PDSPxox */ + 0x004F0E25, /* PDSnoan */ + 0x00500325, /* PDna */ + 0x00510B26, /* DSPnaon */ + 0x005206C9, /* DPSDaox */ + 0x00530764, /* SPDSxaxn */ + 0x005408A9, /* DPSonon */ + 0x00550009, /* Dn DSTINVERT */ + 0x005601A9, /* DPSox */ + 0x00570389, /* DPSoan */ + 0x00580785, /* PDSPoax */ + 0x00590609, /* DPSnox */ + 0x005A0049, /* DPx PATINVERT */ + 0x005B18A9, /* DPSDonox */ + 0x005C0649, /* DPSDxox */ + 0x005D0E29, /* DPSnoan */ + 0x005E1B29, /* DPSDnaox */ + 0x005F00E9, /* DPan */ + 0x00600365, /* PDSxa */ + 0x006116C6, /* DSPDSaoxxn */ + 0x00620786, /* DSPDoax */ + 0x00630608, /* SDPnox */ + 0x00640788, /* SDPSoax */ + 0x00650606, /* DSPnox */ + 0x00660046, /* DSx SRCINVERT */ + 0x006718A8, /* SDPSonox */ + 0x006858A6, /* DSPDSonoxxn */ + 0x00690145, /* PDSxxn */ + 0x006A01E9, /* DPSax */ + 0x006B178A, /* PSDPSoaxxn */ + 0x006C01E8, /* SDPax */ + 0x006D1785, /* PDSPDoaxxn */ + 0x006E1E28, /* SDPSnoax */ + 0x006F0C65, /* PDSxnan */ + 0x00700CC5, /* PDSana */ + 0x00711D5C, /* SSDxPDxaxn */ + 0x00720648, /* SDPSxox */ + 0x00730E28, /* SDPnoan */ + 0x00740646, /* DSPDxox */ + 0x00750E26, /* DSPnoan */ + 0x00761B28, /* SDPSnaox */ + 0x007700E6, /* DSan */ + 0x007801E5, /* PDSax */ + 0x00791786, /* DSPDSoaxxn */ + 0x007A1E29, /* DPSDnoax */ + 0x007B0C68, /* SDPxnan */ + 0x007C1E24, /* SPDSnoax */ + 0x007D0C69, /* DPSxnan */ + 0x007E0955, /* SPxDSxo */ + 0x007F03C9, /* DPSaan */ + 0x008003E9, /* DPSaa */ + 0x00810975, /* SPxDSxon */ + 0x00820C49, /* DPSxna */ + 0x00831E04, /* SPDSnoaxn */ + 0x00840C48, /* SDPxna */ + 0x00851E05, /* PDSPnoaxn */ + 0x008617A6, /* DSPDSoaxx */ + 0x008701C5, /* PDSaxn */ + 0x008800C6, /* DSa SRCAND */ + 0x00891B08, /* SDPSnaoxn */ + 0x008A0E06, /* DSPnoa */ + 0x008B0666, /* DSPDxoxn */ + 0x008C0E08, /* SDPnoa */ + 0x008D0668, /* SDPSxoxn */ + 0x008E1D7C, /* SSDxPDxax */ + 0x008F0CE5, /* PDSanan */ + 0x00900C45, /* PDSxna */ + 0x00911E08, /* SDPSnoaxn */ + 0x009217A9, /* DPSDPoaxx */ + 0x009301C4, /* SPDaxn */ + 0x009417AA, /* PSDPSoaxx */ + 0x009501C9, /* DPSaxn */ + 0x00960169, /* DPSxx */ + 0x0097588A, /* PSDPSonoxx */ + 0x00981888, /* SDPSonoxn */ + 0x00990066, /* DSxn */ + 0x009A0709, /* DPSnax */ + 0x009B07A8, /* SDPSoaxn */ + 0x009C0704, /* SPDnax */ + 0x009D07A6, /* DSPDoaxn */ + 0x009E16E6, /* DSPDSaoxx */ + 0x009F0345, /* PDSxan */ + 0x00A000C9, /* DPa */ + 0x00A11B05, /* PDSPnaoxn */ + 0x00A20E09, /* DPSnoa */ + 0x00A30669, /* DPSDxoxn */ + 0x00A41885, /* PDSPonoxn */ + 0x00A50065, /* PDxn */ + 0x00A60706, /* DSPnax */ + 0x00A707A5, /* PDSPoaxn */ + 0x00A803A9, /* DPSoa */ + 0x00A90189, /* DPSoxn */ + 0x00AA0029, /* D */ + 0x00AB0889, /* DPSono */ + 0x00AC0744, /* SPDSxax */ + 0x00AD06E9, /* DPSDaoxn */ + 0x00AE0B06, /* DSPnao */ + 0x00AF0229, /* DPno */ + 0x00B00E05, /* PDSnoa */ + 0x00B10665, /* PDSPxoxn */ + 0x00B21974, /* SSPxDSxox */ + 0x00B30CE8, /* SDPanan */ + 0x00B4070A, /* PSDnax */ + 0x00B507A9, /* DPSDoaxn */ + 0x00B616E9, /* DPSDPaoxx */ + 0x00B70348, /* SDPxan */ + 0x00B8074A, /* PSDPxax */ + 0x00B906E6, /* DSPDaoxn */ + 0x00BA0B09, /* DPSnao */ + 0x00BB0226, /* DSno MERGEPAINT */ + 0x00BC1CE4, /* SPDSanax */ + 0x00BD0D7D, /* SDxPDxan */ + 0x00BE0269, /* DPSxo */ + 0x00BF08C9, /* DPSano */ + 0x00C000CA, /* PSa MERGECOPY */ + 0x00C11B04, /* SPDSnaoxn */ + 0x00C21884, /* SPDSonoxn */ + 0x00C3006A, /* PSxn */ + 0x00C40E04, /* SPDnoa */ + 0x00C50664, /* SPDSxoxn */ + 0x00C60708, /* SDPnax */ + 0x00C707AA, /* PSDPoaxn */ + 0x00C803A8, /* SDPoa */ + 0x00C90184, /* SPDoxn */ + 0x00CA0749, /* DPSDxax */ + 0x00CB06E4, /* SPDSaoxn */ + 0x00CC0020, /* S SRCCOPY */ + 0x00CD0888, /* SDPono */ + 0x00CE0B08, /* SDPnao */ + 0x00CF0224, /* SPno */ + 0x00D00E0A, /* PSDnoa */ + 0x00D1066A, /* PSDPxoxn */ + 0x00D20705, /* PDSnax */ + 0x00D307A4, /* SPDSoaxn */ + 0x00D41D78, /* SSPxPDxax */ + 0x00D50CE9, /* DPSanan */ + 0x00D616EA, /* PSDPSaoxx */ + 0x00D70349, /* DPSxan */ + 0x00D80745, /* PDSPxax */ + 0x00D906E8, /* SDPSaoxn */ + 0x00DA1CE9, /* DPSDanax */ + 0x00DB0D75, /* SPxDSxan */ + 0x00DC0B04, /* SPDnao */ + 0x00DD0228, /* SDno */ + 0x00DE0268, /* SDPxo */ + 0x00DF08C8, /* SDPano */ + 0x00E003A5, /* PDSoa */ + 0x00E10185, /* PDSoxn */ + 0x00E20746, /* DSPDxax */ + 0x00E306EA, /* PSDPaoxn */ + 0x00E40748, /* SDPSxax */ + 0x00E506E5, /* PDSPaoxn */ + 0x00E61CE8, /* SDPSanax */ + 0x00E70D79, /* SPxPDxan */ + 0x00E81D74, /* SSPxDSxax */ + 0x00E95CE6, /* DSPDSanaxxn */ + 0x00EA02E9, /* DPSao */ + 0x00EB0849, /* DPSxno */ + 0x00EC02E8, /* SDPao */ + 0x00ED0848, /* SDPxno */ + 0x00EE0086, /* DSo SRCPAINT */ + 0x00EF0A08, /* SDPnoo */ + 0x00F00021, /* P PATCOPY */ + 0x00F10885, /* PDSono */ + 0x00F20B05, /* PDSnao */ + 0x00F3022A, /* PSno */ + 0x00F40B0A, /* PSDnao */ + 0x00F50225, /* PDno */ + 0x00F60265, /* PDSxo */ + 0x00F708C5, /* PDSano */ + 0x00F802E5, /* PDSao */ + 0x00F90845, /* PDSxno */ + 0x00FA0089, /* DPo */ + 0x00FB0A09, /* DPSnoo PATPAINT */ + 0x00FC008A, /* PSo */ + 0x00FD0A0A, /* PSDnoo */ + 0x00FE02A9, /* DPSoo */ + 0x00FF0062 /* 1 WHITENESS */ +}; + static inline DWORD get_stride(BITMAPINFO *bmi) { return ((bmi->bmiHeader.biBitCount * bmi->bmiHeader.biWidth + 31) >> 3) & ~3; @@ -40,6 +300,16 @@ static inline DWORD get_dib_size(BITMAPINFO *bmi) return get_stride(bmi) * abs(bmi->bmiHeader.biHeight); } +static inline BOOL rop_uses_src(DWORD rop) +{ + return (((rop & 0xcc0000) >> 2) != (rop & 0x330000)); +} + +static inline BOOL rop_uses_pattern(DWORD rop) +{ + return (((rop & 0xf00000) >> 4) != (rop & 0x0f0000)); +} + static char *hash_dib(BITMAPINFO *bmi, void *bits) { DWORD dib_size = get_dib_size(bmi); @@ -135,6 +405,22 @@ static const char *sha1_graphics_a8r8g8b8[] = "aac8f54a90b6627dfa0b2b84ce1ad434376e3837", "aac8f54a90b6627dfa0b2b84ce1ad434376e3837", "9ac23882cc02cc52603cd321a7eb4c2862d78ecb", + "01bb8ca627e74c5008f191889688e1d0d3830e6b", + "42fef6b56cfa1ddeeae07566294696a8f5310f83", + "22df7b6fa2df43559f288ee72436b296d9143f40", + "25032eb8f1b03beca7823f4f926b61b3841e538b", + "98f2e21fedff6ac7e9de282a8e9d13a095b948c3", + "a859ea82a495de389de3a6281bffbd2f082e166f", + "56fd8510b3f88103e90895d93f4c06da1ae7afc7", + "0cbc00ac6d3c2ffc3b980f680b60aa5add53254a", + "74ffa180af482f95c812117e4002b36425a2350b", + "5eba4e56ec6f2034b24e86137f6169249f02f10a", + "95cb7f0f4368270ae675522c797e6f6ab588ef7b", + "ad6ba8a3520deaa1b85eb6a1f2b3c767b918b3f8", + "0a61d3e8d8a3342d45138b1b3779d80351d20e19", + "c44fd1f38cd19478b5ca89834fa92c192dbc4956", + "1d520746db6e2578044dadbcd0af265ad93e3c13", + "9b5c918db43edb0b5eb1e317d1c1a3be2b18eb77", NULL }; @@ -199,6 +485,22 @@ static const char *sha1_graphics_r8g8b8[] = "71d72b1f16cf670fc8fc45087e924bf5f4e8e485", "71d72b1f16cf670fc8fc45087e924bf5f4e8e485", "42349a2b87efad4a64e7b817c91aa7be3b7a6e5c", + "f2543dc6186f017412dea8132ae0eb0067b7b34d", + "cb480395d2e7ef2c6320e7a13c157fc3f3a6ca0a", + "2f15549c58db97bc7d8fb958b63bac9bf981e380", + "20ed65c22f86f9c0b99f92f034154ca6d360fc0f", + "e03f4ac80f3631c356bebf952885c1e02d10f3c7", + "5d01e5dc5230acdfec8f47412e2ea054ef9793a3", + "4645c13921523b04d7f2aed5880bfa835df0fec7", + "4215b2584c30cb65537bd444dd9eff1fc803d14a", + "6336f354fb31ff4bee34c748a8e2e38064dac0a8", + "c0b3f5b4c12f5ad24e08e52b3f00fb9ea45853ac", + "89a55b8437e04e45a0f4e4006032693e3cf7e018", + "57b9982ceefc840be5ba76c6da547021bf8ea134", + "00c7cd9892504ce86fa2fae30c6f5c9b534cb2e9", + "b49a0257cee389ae64eb17c66d7fad8616c92119", + "80c058f55f6aecf775ec06daaa25c5b4be2ed1ea", + "019277445c316626ca024af2d39a51ebad7cced3", NULL }; @@ -263,6 +565,22 @@ static const char *sha1_graphics_r5g5b5[] = "7af08f5e90dd60d77b352413c9ab80c2e9874cd1", "7af08f5e90dd60d77b352413c9ab80c2e9874cd1", "984cc53040975539828276774ffab20c51a6f72e", + "a0353f412f2c59b21cba3288568fb75f0ade33f4", + "78850e855208bd308103a6cfa4d902d9696ef44c", + "08b429b75a72af746c8237b7eedd21bca7d39b13", + "1b72f26a052edf8adbecb8da1201f93ca7b52fc5", + "bca0a377789288b3cab4270d88bd677c33dc4d8e", + "d491797dd1ad343da5c71dc1471facd575eeed81", + "cc5fda3dd064edfb563c91057ca1f2b625e9668e", + "6a398967e54ad4effef852a03674955c0d8ac359", + "14aa68ae9d3729bb4c1acb7e0216cdeab34a6979", + "1a32c080eb0ce7122aa5b56859547e270d64d23f", + "7e3f989ce484ca33da1285d16c249a1cca615f8a", + "6a052feaa6989729f8ad01c721814c7e553021c5", + "b48aae72b6b85bedb0187260aeafd5759c689206", + "5bd842474d9c4c9b9a68fd045f3a5debf51c6d17", + "e90804ac77bdb4034fbb5a948a1963133d67170f", + "e53c7e15df7f8a6371f5702b4cd67a7083d54c1f", NULL }; @@ -327,6 +645,22 @@ static const char *sha1_graphics_a8b8g8r8[] = "b9ca3bb24d47276f2d9f3ebde2f8212ec3012a7c", "b9ca3bb24d47276f2d9f3ebde2f8212ec3012a7c", "1487d5cb1d2044d9d5ab5490117139cfbd733db5", + "01bb8ca627e74c5008f191889688e1d0d3830e6b", + "4eceae78b0a3c0d7d42568cd6f3826f14d1b0cde", + "f8066f6decd926a09c5ce993550280d1283526dd", + "194f101d1978f5c770a63472e00d1e9fcec7b9f8", + "51782b783934bdb93332d1cdd9a6828b888a7925", + "a859ea82a495de389de3a6281bffbd2f082e166f", + "2fe5923a3d73ae9be37be6aec2290ff1c4a84998", + "6b682bba1584ef44acc6ff64c9a2c2150d156286", + "e1db654f1c368204a990ec5f40c4f999371f3901", + "ceb3948d9d2bdc541a813b388de9390980b3e125", + "95cb7f0f4368270ae675522c797e6f6ab588ef7b", + "599cd0943f68d91525b18bf023c6146a2abcbc10", + "e29d67d6fb6b9824c312eb43e5d80263ebfe99c7", + "80fcb1ab5cfd10e34343ec7d68b87ff7146e7239", + "46246a256de6eb2d69e6d615177352e23569b0d8", + "9b5c918db43edb0b5eb1e317d1c1a3be2b18eb77", NULL }; @@ -391,6 +725,22 @@ static const char *sha1_graphics_a5r9g9b9[] = "9382169de47c9c95b210cb617d98df28ad12b610", "9382169de47c9c95b210cb617d98df28ad12b610", "c6ca46b4ee4b64747598bf08f8420982df402afb", + "01bb8ca627e74c5008f191889688e1d0d3830e6b", + "807399db85c6ef265d758dc928e844e7e1656bcd", + "b76e40e7af557d0116875c1f62b53055905487a6", + "f5bb814b50509e23d38978abfb3afd75e02c20d7", + "4ab2593f8bbe6b7da4b75eabbc1be5ff9756b02e", + "a859ea82a495de389de3a6281bffbd2f082e166f", + "b0b0deb60020f595af949c39722f729881726bda", + "3af587598acf0f0b9aab3341915cc38b8efdce17", + "a8ba923387eda65d91a4478e669b93dd27e6977d", + "7a84d687c8afecc89099d7c51db1fb16825287e6", + "95cb7f0f4368270ae675522c797e6f6ab588ef7b", + "adbf382c2e87765c981287fa678c6d764b87cd25", + "d175d888ba38358c68e30ee44b9b637479a4203a", + "e14213ec869179f40686934110514cdea45a6ae7", + "d8056699ccd789dec0ad7ac331d78aac4f32cdb6", + "9b5c918db43edb0b5eb1e317d1c1a3be2b18eb77", NULL }; @@ -455,6 +805,22 @@ static const char *sha1_graphics_r5g6b5[] = "434adaa9d11e593c339600ff729a065a5c99deed", "434adaa9d11e593c339600ff729a065a5c99deed", "0abc55c21410893dc1b10dadbea66637762f3e97", + "a0353f412f2c59b21cba3288568fb75f0ade33f4", + "dece28d57e60e4495ba3f317d4cfb14c697d2117", + "ddce1ba3814b976ac1401450015100152b105380", + "e60d78768ea00e9ff742716e9c0f0decc8c47935", + "be41b9da9bc3eb43c2fe1089db00a55915b360b3", + "d491797dd1ad343da5c71dc1471facd575eeed81", + "723b29d4ad771ec86bf204738be9904361bcb5c9", + "214c0791b1d0aa023822c68352243b1cfb3406c8", + "50be8792d83a6f819110910d41843d9121fe0926", + "87e481aeed2ef38e8358e2669547e145ecf60ed7", + "7e3f989ce484ca33da1285d16c249a1cca615f8a", + "54f6375d30dcaed8505db4578cdbc08fb4471a87", + "b36f7882e06cc6f994760aa9dcb14dd60abdca9d", + "0c86b204c3db2c51d8be1571045e6304e1d65559", + "9f0bf101a38597cb7af09ff826f60264b553621f", + "e53c7e15df7f8a6371f5702b4cd67a7083d54c1f", NULL }; @@ -519,6 +885,22 @@ static const char *sha1_graphics_r4g5b4[] = "b013279ce9bfbd3e6c276b279a4987fb8dc5805b", "b013279ce9bfbd3e6c276b279a4987fb8dc5805b", "d3eee685884720aaa6bbe9112748a7dd823b0f7e", + "a0353f412f2c59b21cba3288568fb75f0ade33f4", + "2d090fd014a530e5addbd03ada88e7bb5b0e4e07", + "81a2e058eb7e8f4058f22995b25b3c0ab2e1bbf8", + "7a60f4b53cc6588c6d1465b5d1cfdab945fd8fc1", + "19f57c51385003e9bbd912074c2577edc0c345e3", + "d491797dd1ad343da5c71dc1471facd575eeed81", + "dde3f079389a2c1f5a65764a2962f7bad6351621", + "96c775c7acf13339c7bdb3e967e3fced68bedc22", + "746dee730270e6c5e2cb508323dbd0dacfe3b7ec", + "a059e885935b78271ab3f2a590668cbcec2757f7", + "7e3f989ce484ca33da1285d16c249a1cca615f8a", + "0d31dd01ccc678adc1f9f7150471c0048e982408", + "974e30c2f3e719edcecc026af07743be055bf5b5", + "c2fbffc7f1e3198262ecd7f8a833ff1c5505427c", + "7b4887ee234460f3beda1936f2258492f25f3318", + "e53c7e15df7f8a6371f5702b4cd67a7083d54c1f", NULL }; @@ -583,6 +965,22 @@ static const char *sha1_graphics_8[] = "aa06c4f3fa2a6a05ca24b9546b9680bbf240e22d", "aa06c4f3fa2a6a05ca24b9546b9680bbf240e22d", "002ee83fa21a7c7d10c0bcdd442508054c9a2696", + "4801fa201b21ed94c8d33161f7e138075dc434a3", + "8228751e0bad3903b35b3d5cdb90052b448063d7", + "76c12085cc663150d792db4a63d32f4bcf005695", + "359adbba637ee67fdf250913ded6b0131cc2e38d", + "bda3c8bef9b5db6734bc94ad5924aedb8738d13f", + "2610efe0999428184a6cf736f5c7d83e6e4eab62", + "21472bb637d79a12af8ee6ba24aa1a321a332822", + "6fd35a6fa2a7f157e32c408dd3506ab42e755549", + "4801fa201b21ed94c8d33161f7e138075dc434a3", + "8228751e0bad3903b35b3d5cdb90052b448063d7", + "76c12085cc663150d792db4a63d32f4bcf005695", + "359adbba637ee67fdf250913ded6b0131cc2e38d", + "bda3c8bef9b5db6734bc94ad5924aedb8738d13f", + "2610efe0999428184a6cf736f5c7d83e6e4eab62", + "21472bb637d79a12af8ee6ba24aa1a321a332822", + "6fd35a6fa2a7f157e32c408dd3506ab42e755549", NULL }; @@ -647,6 +1045,22 @@ static const char *sha1_graphics_4[] = "8470d91312c6ab646910db50c673ca5ef1bb3d85", "8470d91312c6ab646910db50c673ca5ef1bb3d85", "af6eac13b1cf1998eac6e415f1325795d4d9246c", + "30e5ceca1e9f522f620e8638d1a2e5831c73949e", + "ef62489cfdb257a984071c533136f699f8c16391", + "b8f5f858da37fd16f13658bcd8b01e0aa267d93b", + "19252202802e3ef7a4523a4071dcf7795f1b2fd0", + "a3ef94d5ff13da7d40dedb649d63e28a63107b1a", + "d125d2966672b974d03af35d5fba3495048fa128", + "0a5babb6125077f68b7ae0105f962b56b5343d72", + "18033640b6708a08093b4964dabc13def090bc52", + "30e5ceca1e9f522f620e8638d1a2e5831c73949e", + "ef62489cfdb257a984071c533136f699f8c16391", + "b8f5f858da37fd16f13658bcd8b01e0aa267d93b", + "19252202802e3ef7a4523a4071dcf7795f1b2fd0", + "a3ef94d5ff13da7d40dedb649d63e28a63107b1a", + "d125d2966672b974d03af35d5fba3495048fa128", + "0a5babb6125077f68b7ae0105f962b56b5343d72", + "18033640b6708a08093b4964dabc13def090bc52", NULL }; @@ -711,6 +1125,22 @@ static const char *sha1_graphics_1[] = "596adccf7333db83f72885464b8f9bdc88a26a0d", "596adccf7333db83f72885464b8f9bdc88a26a0d", "b11a1d182490232e2a77251bddd5909d4a9d85fa", + "03af60d5d3549a89fc506d0477fdf1e2c0ca7c45", + "5c58e51fc31acfd51b3ee3babe09d5fd1b0d1df7", + "cde2fe486b4ab1b89c0591cfd59872a6bace2c32", + "4b48d864d45bf2c7a5fc937afd2bada8ea49a372", + "d8fd42abbb9db3f32e2699d747426fde0458b3bd", + "5f8544b4dd13a2cf6e40f8a5732788479f07193b", + "a92ac3bade3f2918af1f92c8c4831dacaf07fa0d", + "42df04e11c0929d4eb1a87d95af826734161ee66", + "71e27b14baa85a46bbbaaf3a77ab870a69b3f920", + "6c10e2f75f1a7e3a1c4c6d2163237e8b6a90eded", + "0eab6335558ea0b370f791595d15d71c6aca6c96", + "3c2b2ce337c8fd2e9582d4b61afc4a32f4d7d785", + "1ad4037f45c8741b92603153b659aa3b71fbce80", + "483f924e026c94658c93840f06cd912b65b2baef", + "80a82cb604a4b555c26d1aba488f016d232a081f", + "15cc89adf4e7ae5fa786245548e12504f8804479", NULL }; @@ -744,6 +1174,7 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh BITMAPINFO *brush_bmi = (BITMAPINFO *)brush_dib; char *brush_bits = brush_dib + sizeof(BITMAPINFOHEADER); DWORD *bit_fields = (DWORD*)brush_bits, *dib_bits; + DWORD ret; solid_pen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0xff)); orig_pen = SelectObject(hdc, solid_pen); @@ -930,6 +1361,23 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh memset(bits, 0xcc, dib_size); + for(i = 0; i < 256; i++) + { + ret = PatBlt(hdc, 10, 10, 30, 30, rop3[i]); + if(rop_uses_src(rop3[i])) + ok(ret == FALSE, "ret %d\n", ret); + else + { + ok(ret == TRUE, "ret %d\n", ret); + if(bmi->bmiHeader.biBitCount == 1 && rop_uses_pattern(rop3[i])) /* Need to learn how to dither brushes. */ + todo_wine compare_hash(bmi, bits, sha1); + else + compare_hash(bmi, bits, sha1); + memset(bits, 0xcc, dib_size); + } + } + + memset(bits, 0xcc, dib_size); SelectObject(hdc, orig_brush); SelectObject(hdc, orig_pen); diff --git a/dlls/winedib.drv/winedib.drv.spec b/dlls/winedib.drv/winedib.drv.spec index 64a95162344..162bee34e77 100644 --- a/dlls/winedib.drv/winedib.drv.spec +++ b/dlls/winedib.drv/winedib.drv.spec @@ -1,6 +1,7 @@ @ cdecl CreateBitmap(ptr long ptr) DIBENG_CreateBitmap @ cdecl CreateDC(long ptr wstr wstr wstr ptr) DIBENG_CreateDC @ cdecl LineTo(ptr long long) DIBENG_LineTo +@ cdecl PatBlt(ptr long long long long long) DIBENG_PatBlt @ cdecl Rectangle(ptr long long long long) DIBENG_Rectangle @ cdecl SelectBitmap(ptr ptr) DIBENG_SelectBitmap @ cdecl SelectBrush(ptr ptr) DIBENG_SelectBrush -- 2.11.4.GIT