[Bf-blender-cvs] [d4d40f3b69d] master: DNA: reduce size of Base struct
Campbell Barton
noreply at git.blender.org
Mon Oct 3 02:20:33 CEST 2022
Commit: d4d40f3b69d8d9d1cd65839d8b577010b708112d
Author: Campbell Barton
Date: Mon Oct 3 11:15:45 2022 +1100
Branches: master
https://developer.blender.org/rBd4d40f3b69d8d9d1cd65839d8b577010b708112d
DNA: reduce size of Base struct
Re-order members and remove pad members,
reducing it's size by 24 bytes on 64 bit systems.
===================================================================
M source/blender/makesdna/DNA_layer_types.h
===================================================================
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index 63bc379c27a..827e07725a1 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -71,26 +71,23 @@ typedef enum eViewLayerCryptomatteFlags {
typedef struct Base {
struct Base *next, *prev;
- /* Flags which are based on the collections flags evaluation, does not
- * include flags from object's restrictions. */
- short flag_from_collection;
+ struct Object *object;
+
+ /* Pointer to an original base. Is initialized for evaluated view layer.
+ * NOTE: Only allowed to be accessed from within active dependency graph. */
+ struct Base *base_orig;
+ unsigned int lay DNA_DEPRECATED;
/* Final flags, including both accumulated collection flags and object's
* restriction flags. */
short flag;
-
+ /* Flags which are based on the collections flags evaluation, does not
+ * include flags from object's restrictions. */
+ short flag_from_collection;
+ short flag_legacy;
unsigned short local_view_bits;
- char _pad1[10];
- struct Object *object;
- unsigned int lay DNA_DEPRECATED;
- int flag_legacy;
unsigned short local_collections_bits;
- short _pad2[3];
-
- /* Pointer to an original base. Is initialized for evaluated view layer.
- * NOTE: Only allowed to be accessed from within active dependency graph. */
- struct Base *base_orig;
- void *_pad;
+ char _pad1[2];
} Base;
typedef struct ViewLayerEngineData {
More information about the Bf-blender-cvs
mailing list