comparison include/mb_types.h @ 816:0e56a1ca19b2

Testcases for caching coords
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 13 Sep 2010 13:25:34 +0800
parents cedfe4966fd6
children 586e50f82c1f
comparison
equal deleted inserted replaced
815:4badbfa8f386 816:0e56a1ca19b2
258 * updated. 258 * updated.
259 */ 259 */
260 #define COF_SKIP_ZERO 0x2000 /*!< \brief The coord just skip zeroing. 260 #define COF_SKIP_ZERO 0x2000 /*!< \brief The coord just skip zeroing.
261 * No real zeroing was performed. 261 * No real zeroing was performed.
262 */ 262 */
263 #define COF_ALWAYS_CACHE 0x4000 /*!< \brief The coord always own a canvas */
263 /* @} */ 264 /* @} */
264 265
265 extern void matrix_mul(co_aix *m1, co_aix *m2, co_aix *dst); 266 extern void matrix_mul(co_aix *m1, co_aix *m2, co_aix *dst);
266 extern void matrix_trans_pos(co_aix *matrix, co_aix *x, co_aix *y); 267 extern void matrix_trans_pos(co_aix *matrix, co_aix *x, co_aix *y);
267 268
296 do { \ 297 do { \
297 (co)->flags &= ~COF_CACHE_MASK; \ 298 (co)->flags &= ~COF_CACHE_MASK; \
298 } while(0) 299 } while(0)
299 #define coord_is_root(co) ((co)->parent == NULL) 300 #define coord_is_root(co) ((co)->parent == NULL)
300 #define coord_is_cached(co) ((co)->flags & COF_OWN_CANVAS) 301 #define coord_is_cached(co) ((co)->flags & COF_OWN_CANVAS)
302 #define coord_is_always_cached(co) ((co)->flags & COF_ALWAYS_CACHE)
301 #define coord_is_fast_cached(co) ((co)->flags & COF_FAST_MASK) 303 #define coord_is_fast_cached(co) ((co)->flags & COF_FAST_MASK)
302 #define coord_is_precise_cached(co) ((co)->flags & COF_PRECISE_MASK) 304 #define coord_is_precise_cached(co) ((co)->flags & COF_PRECISE_MASK)
303 #define coord_is_zeroing(co) ((co)->flags & COF_MUST_ZEROING) 305 #define coord_is_zeroing(co) ((co)->flags & COF_MUST_ZEROING)
304 #define coord_set_zeroing(co) \ 306 #define coord_set_zeroing(co) \
305 do { (co)->flags |= COF_MUST_ZEROING; } while(0) 307 do { (co)->flags |= COF_MUST_ZEROING; } while(0)