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

Side by Side Diff: utility/include/bmpblk_utility.h

Issue 6508006: Enable EFIv1 compression in bmpbklk_utility. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: Added tests, updated copyrights, moved bmpblk_util.h as suggested. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utility/include/bmpblk_util.h ('k') | utility/include/eficompress.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #ifndef VBOOT_REFERENCE_BMPBLK_UTILITY_H_ 6 #ifndef VBOOT_REFERENCE_BMPBLK_UTILITY_H_
7 #define VBOOT_REFERENCE_BMPBLK_UTILITY_H_ 7 #define VBOOT_REFERENCE_BMPBLK_UTILITY_H_
8 8
9 #include "bmpblk_header.h" 9 #include "bmpblk_header.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 /* Compress all the images using a given comression method. */ 58 /* Compress all the images using a given comression method. */
59 void compress_all_images(const Compression compress); 59 void compress_all_images(const Compression compress);
60 60
61 /* Contruct the bmpblock. */ 61 /* Contruct the bmpblock. */
62 void pack_bmpblock(); 62 void pack_bmpblock();
63 63
64 /* Write the bmpblock to a file */ 64 /* Write the bmpblock to a file */
65 void write_to_bmpblock(const char *filename); 65 void write_to_bmpblock(const char *filename);
66 66
67 /* What compression to use for the images */
68 void force_compression(uint32_t compression);
69
67 private: 70 private:
68 /* Clear all internal data. */ 71 /* Clear all internal data. */
69 void initialize(); 72 void initialize();
70 73
71 /* Elemental function called from load_from_config. 74 /* Elemental function called from load_from_config.
72 * Load the config file (yaml format) and parse it. */ 75 * Load the config file (yaml format) and parse it. */
73 void load_yaml_config(const char *filename); 76 void load_yaml_config(const char *filename);
74 77
75 /* Elemental function called from load_from_config. 78 /* Elemental function called from load_from_config.
76 * Load all image files into the internal variables. */ 79 * Load all image files into the internal variables. */
(...skipping 21 matching lines...) Expand all
98 const string read_image_file(const char *filename); 101 const string read_image_file(const char *filename);
99 ImageFormat get_image_format(const string content); 102 ImageFormat get_image_format(const string content);
100 uint32_t get_bmp_image_width(const string content); 103 uint32_t get_bmp_image_width(const string content);
101 uint32_t get_bmp_image_height(const string content); 104 uint32_t get_bmp_image_height(const string content);
102 105
103 /* Internal variable for storing the config of BmpBlock. */ 106 /* Internal variable for storing the config of BmpBlock. */
104 BmpBlockConfig config_; 107 BmpBlockConfig config_;
105 108
106 /* Internal variable for storing the content of BmpBlock. */ 109 /* Internal variable for storing the content of BmpBlock. */
107 string bmpblock_; 110 string bmpblock_;
111
112 /* Internal variables to determine whether or not to specify compression */
113 bool set_compression_; // true if we force it
114 uint32_t compression_; // what we force it to
108 }; 115 };
109 116
110 } // namespace vboot_reference 117 } // namespace vboot_reference
111 118
112 #endif // VBOOT_REFERENCE_BMPBLK_UTILITY_H_ 119 #endif // VBOOT_REFERENCE_BMPBLK_UTILITY_H_
OLDNEW
« no previous file with comments | « utility/include/bmpblk_util.h ('k') | utility/include/eficompress.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698