Commit Graph

17 Commits

Author SHA1 Message Date
Alexandre Julliard 3527230c46 include: Remove the wine_ prefix on rbtree functions.
Add defines for frequently-used functions.

For compatibility with vkd3d.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:55 +01:00
Henri Verbeet f31a29b8d1 wined3d: Introduce a slab allocator for small buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 21:11:14 +02:00
Alexandre Julliard 5d01ebab89 rbtree: Clarify the loop conditions to avoid confusing older gcc.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-25 19:00:40 +02:00
Alexandre Julliard c1d46149e0 rbtree.h: Add a wine_rb_prev iteration helper function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-07 19:31:26 +02:00
Jacek Caban 357bf1b569 rbtree.h: Added WINE_RB_FOR_EACH_DESTRUCTOR and WINE_RB_FOR_EACH_ENTRY_DESTRUCTOR helpers for implementing tree destructors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-14 22:49:14 +01:00
Jacek Caban c16fb053d1 rbtree.h: Added ordered iteration functions and macros.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 11:40:42 +09:00
Jacek Caban d29e59a145 rbtree.h: Take wine_rb_entry as wine_rb_remove argument type and add new wine_rb_remove_key helper using key.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-14 00:01:53 +09:00
Jacek Caban acc0bb0521 rbtree.h: Pass compare function instead of wine_rb_functions to wine_rb_init.
Also change return type to void since the function can no longer fail.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 23:30:29 +09:00
Jacek Caban f5d7ee1a57 rbtree.h: Store compare function instead of wine_rb_functions in wine_rb_tree.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-31 22:19:36 +09:00
Jacek Caban 69f571dbeb rbtree.h: Get rid of no longer needed wine_rb_stack.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 11:44:09 +09:00
Jacek Caban e3a19d3b2f rbtree.h: Rewrite wine_rb_put to use parent pointers instead of stack.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 11:44:03 +09:00
Jacek Caban f9dc4832ed rbtree.h: Rewrite wine_rb_remove to use parent pointers instead of stack.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 11:43:59 +09:00
Jacek Caban 20740d849e rbtree.h: Use parent pointer instead of stack in wine_rb_postorder.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 11:43:55 +09:00
Jacek Caban 256f55e75b rbtree.h: Store parent entry pointer in each entry.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 11:43:50 +09:00
Henri Verbeet 525696fe6c wined3d: Properly cleanup samplers on wined3d_device_reset() / wined3d_device_uninit_3d(). 2015-01-19 14:31:53 +01:00
Amine Khaldi d6617e1ec5 include: Define WINE_RB_ENTRY_VALUE using the standard offsetof. 2012-12-11 15:48:59 +01:00
Henri Verbeet 484cde1327 include: Add a generic red-black tree. 2009-06-03 11:40:09 +02:00