summaryrefslogtreecommitdiffstats
path: root/lib/skin_parser
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-10-16 15:55:12 +0000
committerThomas Martitz <kugel@rockbox.org>2011-10-16 15:55:12 +0000
commit4f3e1d6b487c5a197caf2351e4ed607a056811fd (patch)
tree48a12d0d9dc0a580346b432bb1ab9c74f6c32be3 /lib/skin_parser
parent899865a70b0acf16e5e6fa5c6fd2649db1769bc2 (diff)
downloadrockbox-4f3e1d6b487c5a197caf2351e4ed607a056811fd.tar.gz
rockbox-4f3e1d6b487c5a197caf2351e4ed607a056811fd.tar.bz2
rockbox-4f3e1d6b487c5a197caf2351e4ed607a056811fd.zip
Fix FS#12320 - need substitute to /.rockbox/skin_buffer_size.txt
Since recent skin engine related commits images aren't stored on the skin buffer anymore. The buffer was decreased accordingly. Now some themes used that buffer more for tokens than images and are now broken. To fix, increase the max token count, while optimizing the two most often allocated structs for size (so no net ram usage increase). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30762 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'lib/skin_parser')
-rw-r--r--lib/skin_parser/skin_parser.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/lib/skin_parser/skin_parser.h b/lib/skin_parser/skin_parser.h
index 6f1af25a05..3e0634976c 100644
--- a/lib/skin_parser/skin_parser.h
+++ b/lib/skin_parser/skin_parser.h
@@ -86,15 +86,15 @@ struct skin_tag_parameter
};
-/* Defines an element of a SKIN file */
+/* Defines an element of a SKIN file,
+ *
+ * This is allocated a lot, so it's optimized for size */
struct skin_element
{
- /* Defines what type of element it is */
- enum skin_element_type type;
-
- /* The line on which it's defined in the source file */
- int line;
-
+ /* Link to the next element */
+ struct skin_element* next;
+ /* Pointer to an array of children */
+ struct skin_element** children;
/* Placeholder for element data
* TEXT and COMMENT uses it for the text string
* TAG, VIEWPORT, LINE, etc may use it for post parse extra storage
@@ -104,16 +104,17 @@ struct skin_element
/* The tag or conditional name */
const struct tag_info *tag;
- /* Pointer to and size of an array of parameters */
- int params_count;
+ /* Pointer to an array of parameters */
struct skin_tag_parameter* params;
- /* Pointer to and size of an array of children */
- int children_count;
- struct skin_element** children;
-
- /* Link to the next element */
- struct skin_element* next;
+ /* Number of elements in the children array */
+ short children_count;
+ /* The line on which it's defined in the source file */
+ short line;
+ /* Defines what type of element it is */
+ enum skin_element_type type;
+ /* Number of elements in the params array */
+ char params_count;
};
enum skin_cb_returnvalue