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
b7006600
Commit
b7006600
authored
Oct 19, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Oct 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Add tests for non-rgb colorrefs.
parent
a3b5f270
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
dib.c
dlls/gdi32/tests/dib.c
+47
-0
No files found.
dlls/gdi32/tests/dib.c
View file @
b7006600
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "wingdi.h"
#include "wingdi.h"
#include "winuser.h"
#include "winuser.h"
#include "wincrypt.h"
#include "wincrypt.h"
#include "mmsystem.h"
/* DIBINDEX */
#include "wine/test.h"
#include "wine/test.h"
...
@@ -129,6 +130,7 @@ static const char *sha1_graphics_a8r8g8b8[] =
...
@@ -129,6 +130,7 @@ static const char *sha1_graphics_a8r8g8b8[] =
"d7dd4700f49808541bba99244b7eb5840e0a2439"
,
"d7dd4700f49808541bba99244b7eb5840e0a2439"
,
"af99228aa4cfbd1f61bd824db046144a3c6c2ed7"
,
"af99228aa4cfbd1f61bd824db046144a3c6c2ed7"
,
"568f87f0194ca19b69a5b2bcdef795d89c5721ce"
,
"568f87f0194ca19b69a5b2bcdef795d89c5721ce"
,
"257d114354a93e681225072bcde756f155b70496"
,
NULL
NULL
};
};
...
@@ -186,6 +188,7 @@ static const char *sha1_graphics_a8b8g8r8[] =
...
@@ -186,6 +188,7 @@ static const char *sha1_graphics_a8b8g8r8[] =
"86c84cc8306975edecc6d4a89a8aff29f59b55a7"
,
"86c84cc8306975edecc6d4a89a8aff29f59b55a7"
,
"af99228aa4cfbd1f61bd824db046144a3c6c2ed7"
,
"af99228aa4cfbd1f61bd824db046144a3c6c2ed7"
,
"25675c30adfe24d6cae60793b156dfdaa36ac3ba"
,
"25675c30adfe24d6cae60793b156dfdaa36ac3ba"
,
"2c4f116451b571106beba8b85da8e4b923937246"
,
NULL
NULL
};
};
...
@@ -243,6 +246,7 @@ static const char *sha1_graphics_r10g10b10[] =
...
@@ -243,6 +246,7 @@ static const char *sha1_graphics_r10g10b10[] =
"fc0c32afb719295f28bcfef22803bef94f798e20"
,
"fc0c32afb719295f28bcfef22803bef94f798e20"
,
"36f6db4fbe2a1630a7597d3a446f2902755c96ef"
,
"36f6db4fbe2a1630a7597d3a446f2902755c96ef"
,
"d3f08946300e1700865042aed121870e292d1095"
,
"d3f08946300e1700865042aed121870e292d1095"
,
"abb56db94becb64d663b51f0ea6b4bd535a88ba0"
,
NULL
NULL
};
};
...
@@ -300,6 +304,7 @@ static const char *sha1_graphics_r6g6b6[] =
...
@@ -300,6 +304,7 @@ static const char *sha1_graphics_r6g6b6[] =
"49341c297a887186bd47d7465d827ab3147f05e3"
,
"49341c297a887186bd47d7465d827ab3147f05e3"
,
"325279e76367200d3fd7194d81c09fd139988ece"
,
"325279e76367200d3fd7194d81c09fd139988ece"
,
"c3def160a1e847605ff0fc7edd30397fa90635a0"
,
"c3def160a1e847605ff0fc7edd30397fa90635a0"
,
"50acb1597c4d53ad63225376d2aa36f64e8a229d"
,
NULL
NULL
};
};
...
@@ -357,6 +362,7 @@ static const char *sha1_graphics_24[] =
...
@@ -357,6 +362,7 @@ static const char *sha1_graphics_24[] =
"b25ba91487ec945410deb2b51bc1156890c032a8"
,
"b25ba91487ec945410deb2b51bc1156890c032a8"
,
"d347ca5c6c4b6a61389247c3b6f61564033e8c25"
,
"d347ca5c6c4b6a61389247c3b6f61564033e8c25"
,
"ee315634ed92da3a32c2675ecd1b369471c60936"
,
"ee315634ed92da3a32c2675ecd1b369471c60936"
,
"3491e2bd81e70dd203c8551cc2d39b19401caafe"
,
NULL
NULL
};
};
...
@@ -418,6 +424,7 @@ static const char *sha1_graphics_r5g5b5[] =
...
@@ -418,6 +424,7 @@ static const char *sha1_graphics_r5g5b5[] =
"3772003c7fb420003512d0c437b3659d96d89ce4"
,
"3772003c7fb420003512d0c437b3659d96d89ce4"
,
"dab47c9dc149e570045d699598b14a613bf319b3"
,
"dab47c9dc149e570045d699598b14a613bf319b3"
,
"2daca4d26a086ed34894693be0b0374402232809"
,
"2daca4d26a086ed34894693be0b0374402232809"
,
"bf0e0b74ce5686b73c527843e0d0df0cd10efefe"
,
NULL
NULL
};
};
...
@@ -474,6 +481,7 @@ static const char *sha1_graphics_r4g4b4[] =
...
@@ -474,6 +481,7 @@ static const char *sha1_graphics_r4g4b4[] =
"f0acb3cfcda62e95bee5f7bc8830ffeb3dd7e5a7"
,
"f0acb3cfcda62e95bee5f7bc8830ffeb3dd7e5a7"
,
"07b10c3f191d0a93e5e5694aae37dcad407e10f5"
,
"07b10c3f191d0a93e5e5694aae37dcad407e10f5"
,
"f7900e60347029876ba55e8f0c4c02e89deb36b6"
,
"f7900e60347029876ba55e8f0c4c02e89deb36b6"
,
"734d4a7836891d729f4a9ec6916ead78eecb2596"
,
NULL
NULL
};
};
...
@@ -536,6 +544,7 @@ static const char *sha1_graphics_8_color[] =
...
@@ -536,6 +544,7 @@ static const char *sha1_graphics_8_color[] =
"9ae38bb94c7b4c0c6dfebbee23d1de4db9b77488"
,
"9ae38bb94c7b4c0c6dfebbee23d1de4db9b77488"
,
"678979a45126a76eb629992cd64734862f53a555"
,
"678979a45126a76eb629992cd64734862f53a555"
,
"2f7ba8803604c032cb1a1228bc021f0f1c03e245"
,
"2f7ba8803604c032cb1a1228bc021f0f1c03e245"
,
"0204f06422a01787f7379d0edb51104bb023758a"
,
NULL
NULL
};
};
...
@@ -603,6 +612,7 @@ static const char *sha1_graphics_8_grayscale[] =
...
@@ -603,6 +612,7 @@ static const char *sha1_graphics_8_grayscale[] =
"3685c9ae95118a83db3569832c29753276fa1264"
,
"3685c9ae95118a83db3569832c29753276fa1264"
,
"09640bad951c33e7d70a1fced83b1869f65b3fc5"
,
"09640bad951c33e7d70a1fced83b1869f65b3fc5"
,
"cb9ea8137eca1450e049879772f5c11a0e11ff0a"
,
"cb9ea8137eca1450e049879772f5c11a0e11ff0a"
,
"a05e05b2e6e515baa59ea032d063ca11e70a72b5"
,
NULL
NULL
};
};
...
@@ -663,6 +673,7 @@ static const char *sha1_graphics_8[] =
...
@@ -663,6 +673,7 @@ static const char *sha1_graphics_8[] =
"31e667c2dbb81dcf81d01cb88f794e88ddb90ff2"
,
"31e667c2dbb81dcf81d01cb88f794e88ddb90ff2"
,
"465d9cd0a77ab4fcf035aa67544b2a26269e0b09"
,
"465d9cd0a77ab4fcf035aa67544b2a26269e0b09"
,
"600d6b2713d5e4c0d90c02660245ed26c7ae3033"
,
"600d6b2713d5e4c0d90c02660245ed26c7ae3033"
,
"963d1fa8608c8b743e972eb9a4e9f3fc53c6c7e8"
,
NULL
NULL
};
};
...
@@ -719,6 +730,7 @@ static const char *sha1_graphics_4[] =
...
@@ -719,6 +730,7 @@ static const char *sha1_graphics_4[] =
"df5feb905a31c288008cf5e82d73ac818a160d82"
,
"df5feb905a31c288008cf5e82d73ac818a160d82"
,
"d8af3868c66c7d6dac35ec8ee0317b38a6910bb1"
,
"d8af3868c66c7d6dac35ec8ee0317b38a6910bb1"
,
"ec8e2aebfb4a1c28ebcd0e053b9e4d8638b50951"
,
"ec8e2aebfb4a1c28ebcd0e053b9e4d8638b50951"
,
"da401c745421f6bdfaefd590ab99dee948dce412"
,
NULL
NULL
};
};
...
@@ -775,6 +787,7 @@ static const char *sha1_graphics_4_grayscale[] =
...
@@ -775,6 +787,7 @@ static const char *sha1_graphics_4_grayscale[] =
"f8681c09f1abfc38d31e47622cb8798cd896a00e"
,
"f8681c09f1abfc38d31e47622cb8798cd896a00e"
,
"b5ee51cfc73acb59a2f6124509ea236f8fc7f9f7"
,
"b5ee51cfc73acb59a2f6124509ea236f8fc7f9f7"
,
"d374d4d92c940ae42a9b42c14d744341b68a8c14"
,
"d374d4d92c940ae42a9b42c14d744341b68a8c14"
,
"25ec9fd2eeb1514ba4e0458a444149a5456cf63a"
,
NULL
NULL
};
};
...
@@ -846,6 +859,7 @@ static const char *sha1_graphics_1[] =
...
@@ -846,6 +859,7 @@ static const char *sha1_graphics_1[] =
"23366004515f3bc46796ea505d748f8d0f97fbe1"
,
"23366004515f3bc46796ea505d748f8d0f97fbe1"
,
"88763f8e8fcf4f78fa864325791a9dd35a0bd279"
,
"88763f8e8fcf4f78fa864325791a9dd35a0bd279"
,
"013cee26bac8f815eadad4bfc012d9b5d01c3b7f"
,
"013cee26bac8f815eadad4bfc012d9b5d01c3b7f"
,
"6b2cb2346b5820bdd0251cd6a4aeb5c22ee82e85"
,
NULL
NULL
};
};
...
@@ -1055,6 +1069,14 @@ static const DWORD four_by_four_data[16] = { 0x000000, 0xff0000, 0x00ff00, 0x000
...
@@ -1055,6 +1069,14 @@ static const DWORD four_by_four_data[16] = { 0x000000, 0xff0000, 0x00ff00, 0x000
0x000000
,
0xff0000
,
0x00ff00
,
0x0000ff
,
0x000000
,
0xff0000
,
0x00ff00
,
0x0000ff
,
0xffffff
,
0x00ffff
,
0xff00ff
,
0xffff00
};
0xffffff
,
0x00ffff
,
0xff00ff
,
0xffff00
};
static
inline
void
solid_patblt
(
HDC
hdc
,
int
x
,
int
y
,
int
width
,
int
height
,
COLORREF
color
)
{
HBRUSH
brush
=
CreateSolidBrush
(
color
);
brush
=
SelectObject
(
hdc
,
brush
);
PatBlt
(
hdc
,
x
,
y
,
width
,
height
,
PATCOPY
);
DeleteObject
(
SelectObject
(
hdc
,
brush
)
);
}
static
void
draw_graphics
(
HDC
hdc
,
BITMAPINFO
*
bmi
,
BYTE
*
bits
,
const
char
***
sha1
)
static
void
draw_graphics
(
HDC
hdc
,
BITMAPINFO
*
bmi
,
BYTE
*
bits
,
const
char
***
sha1
)
{
{
DWORD
dib_size
=
get_dib_size
(
bmi
);
DWORD
dib_size
=
get_dib_size
(
bmi
);
...
@@ -1925,7 +1947,32 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh
...
@@ -1925,7 +1947,32 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh
ok
(
ret
==
-
4
,
"got %d
\n
"
,
ret
);
ok
(
ret
==
-
4
,
"got %d
\n
"
,
ret
);
compare_hash_broken_todo
(
bmi
,
bits
,
sha1
,
"stretchdibits"
,
dib_is_8bpp_gray
?
1
:
0
,
dib_is_8bpp_gray
);
compare_hash_broken_todo
(
bmi
,
bits
,
sha1
,
"stretchdibits"
,
dib_is_8bpp_gray
?
1
:
0
,
dib_is_8bpp_gray
);
memset
(
bits
,
0xcc
,
dib_size
);
/* Solid colors */
for
(
i
=
0
;
i
<
256
;
i
++
)
{
solid_patblt
(
hdc
,
i
*
2
,
10
,
1
,
1
,
DIBINDEX
(
i
)
);
solid_patblt
(
hdc
,
i
*
2
,
20
,
1
,
1
,
PALETTEINDEX
(
i
)
);
solid_patblt
(
hdc
,
i
*
2
,
30
,
1
,
1
,
RGB
(
(
i
&
0x07
)
<<
5
,
(
i
&
0x38
)
<<
2
,
i
&
0xc0
)
);
solid_patblt
(
hdc
,
i
*
2
,
40
,
1
,
1
,
PALETTERGB
(
(
i
&
0x07
)
<<
5
,
(
i
&
0x38
)
<<
2
,
i
&
0xc0
)
);
}
/* A few extra colors that are interesting in the 1bpp case */
/* bk color */
solid_patblt
(
hdc
,
0
,
50
,
1
,
1
,
RGB
(
0
,
0xff
,
0
)
);
solid_patblt
(
hdc
,
2
,
50
,
1
,
1
,
PALETTERGB
(
0
,
0xff
,
0
)
);
/* color 0 */
solid_patblt
(
hdc
,
4
,
50
,
1
,
1
,
RGB
(
0
,
0x1
,
0xff
)
);
solid_patblt
(
hdc
,
6
,
50
,
1
,
1
,
PALETTERGB
(
0
,
0x1
,
0xff
)
);
/* color 1 */
solid_patblt
(
hdc
,
8
,
50
,
1
,
1
,
RGB
(
0xff
,
0
,
0
)
);
solid_patblt
(
hdc
,
10
,
50
,
1
,
1
,
PALETTERGB
(
0xff
,
0
,
0
)
);
compare_hash
(
bmi
,
bits
,
sha1
,
"Colors"
);
memset
(
bits
,
0xcc
,
dib_size
);
memset
(
bits
,
0xcc
,
dib_size
);
SelectObject
(
hdc
,
orig_brush
);
SelectObject
(
hdc
,
orig_brush
);
...
...
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