Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1526)

Unified Diff: utility/bmpblk_utility.cc

Issue 6489026: Whitelist RLE compression for ARM in bmpblk_utility (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utility/bmpblk_utility.cc
diff --git a/utility/bmpblk_utility.cc b/utility/bmpblk_utility.cc
index f997cf5d9184a8737c5280f51340ce1766b8ccc4..66b60d9deb2fa33b545198bc7150abdddfb366f5 100644
--- a/utility/bmpblk_utility.cc
+++ b/utility/bmpblk_utility.cc
@@ -30,7 +30,7 @@ typedef struct {
uint32_t PixelHeight;
uint16_t Planes; // Must be 1 for x86
uint16_t BitPerPixel; // 1, 4, 8, or 24 for x86
- uint32_t CompressionType; // must be 0 for x86
+ uint32_t CompressionType; // 0 (none) for x86, 1 (RLE) for arm
uint32_t ImageSize;
uint32_t XPixelsPerMeter;
uint32_t YPixelsPerMeter;
@@ -334,7 +334,7 @@ ImageFormat BmpBlockUtil::get_image_format(const string content) {
if (hdr->CharB != 'B' || hdr->CharM != 'M' ||
hdr->Planes != 1 ||
- hdr->CompressionType != 0 ||
+ (hdr->CompressionType != 0 && hdr->CompressionType != 1) ||
(hdr->BitPerPixel != 1 && hdr->BitPerPixel != 4 &&
hdr->BitPerPixel != 8 && hdr->BitPerPixel != 24))
return FORMAT_INVALID;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698