Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 86 |
| 87 /* Elemental function called from load_from_config. | 87 /* Elemental function called from load_from_config. |
| 88 * Contruct the BmpBlockHeader struct. */ | 88 * Contruct the BmpBlockHeader struct. */ |
| 89 void fill_bmpblock_header(); | 89 void fill_bmpblock_header(); |
| 90 | 90 |
| 91 /* Helper functions for parsing a YAML config file. */ | 91 /* Helper functions for parsing a YAML config file. */ |
| 92 void expect_event(yaml_parser_t *parser, const yaml_event_type_e type); | 92 void expect_event(yaml_parser_t *parser, const yaml_event_type_e type); |
| 93 void parse_config(yaml_parser_t *parser); | 93 void parse_config(yaml_parser_t *parser); |
| 94 void parse_first_layer(yaml_parser_t *parser); | 94 void parse_first_layer(yaml_parser_t *parser); |
| 95 void parse_bmpblock(yaml_parser_t *parser); | 95 void parse_bmpblock(yaml_parser_t *parser); |
| 96 void parse_compression(yaml_parser_t *parser); | |
|
Randall Spangler
2011/02/17 22:27:43
Just noticed, aren't we nestling * to the type not
| |
| 96 void parse_images(yaml_parser_t *parser); | 97 void parse_images(yaml_parser_t *parser); |
| 97 void parse_layout(yaml_parser_t *parser, ScreenConfig &screen); | 98 void parse_layout(yaml_parser_t *parser, ScreenConfig &screen); |
| 98 void parse_screens(yaml_parser_t *parser); | 99 void parse_screens(yaml_parser_t *parser); |
| 99 void parse_localizations(yaml_parser_t *parser); | 100 void parse_localizations(yaml_parser_t *parser); |
| 100 | 101 |
| 101 /* Useful functions */ | 102 /* Useful functions */ |
| 102 const string read_image_file(const char *filename); | 103 const string read_image_file(const char *filename); |
| 103 ImageFormat get_image_format(const string content); | 104 ImageFormat get_image_format(const string content); |
| 104 uint32_t get_bmp_image_width(const string content); | 105 uint32_t get_bmp_image_width(const string content); |
| 105 uint32_t get_bmp_image_height(const string content); | 106 uint32_t get_bmp_image_height(const string content); |
| 106 | 107 |
| 107 /* Internal variable for storing the config of BmpBlock. */ | 108 /* Internal variable for storing the config of BmpBlock. */ |
| 108 BmpBlockConfig config_; | 109 BmpBlockConfig config_; |
| 109 | 110 |
| 110 /* Internal variable for storing the content of BmpBlock. */ | 111 /* Internal variable for storing the content of BmpBlock. */ |
| 111 string bmpblock_; | 112 string bmpblock_; |
| 112 | 113 |
| 113 /* Internal variables to determine whether or not to specify compression */ | 114 /* Internal variables to determine whether or not to specify compression */ |
| 114 bool set_compression_; // true if we force it | 115 bool set_compression_; // true if we force it |
| 115 uint32_t compression_; // what we force it to | 116 uint32_t compression_; // what we force it to |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace vboot_reference | 119 } // namespace vboot_reference |
| 119 | 120 |
| 120 #endif // VBOOT_REFERENCE_BMPBLK_UTILITY_H_ | 121 #endif // VBOOT_REFERENCE_BMPBLK_UTILITY_H_ |
| OLD | NEW |