Commit Graph
5 Commits
Author SHA1 Message Date
Ruiyu Ni 56bda6da0b MdeModulePkg/BmpSupportLib: Check PixelHeight/PixelWidth against 0
The patch adds check logic to make sure that for a input BMP file,
the width or height is not 0; for a input GOP blt buffer, the width
or height is not 0. Otherwise, UNSUPPORTED status is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Cc: Michael D Kinney <[email protected]>
(cherry picked from commit 51fe5b5140)
2018-07-09 13:14:31 +08:00
Ruiyu Ni 0c3ac72a88 MdeModulePkg/BmpSupportLib: Correct debug message
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <[email protected]>
Cc: Michael D Kinney <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
(cherry picked from commit 2a9e1b97c9)
2018-07-09 13:14:30 +08:00
Dandan Bi 05d48dace8 MdeModulePkg: Fix coding style issues in file/function comments
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
(cherry picked from commit ae38c9765a)
2018-07-09 10:51:34 +08:00
Hao Wu 63bcec2f01 MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction
Since the pointer subtraction here is not performed by pointers to
elements of the same array object. This might lead to potential issues,
such behavior is undefined according to C11 standard.

Refine the pointer subtraction expressions by casting each pointer to
UINTN first and then perform the subtraction.

Cc: Michael D Kinney <[email protected]>
Cc: Sean Brogan <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
(cherry picked from commit 99576ee3fd)
2018-07-09 10:43:54 +08:00
Kinney, Michael D 9a54b42353 MdeModulePkg: Add BmpSupportLib class and instance
https://bugzilla.tianocore.org/show_bug.cgi?id=800

Based on content from the following branch/commits:
https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport
https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2e60302b2d
https://github.com/Microsoft/MS_UEFI/commit/ca516b1a61315c2d823f453e12d2135098f53d61
https://github.com/Microsoft/MS_UEFI/commit/2b9f111f2e74a4c2ef4c4e32379e111f016dbd9b

Add BmpSupportLib class and instances that provides services to
convert a BMP graphics image to a GOP BLT buffer and to convert
a GOP BLT buffer to a BMP graphics image.

Cc: Sean Brogan <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Reviewed-by: Bret Barkelew <[email protected]>
(cherry picked from commit 4123d6da70)
2018-07-06 19:27:42 +08:00