} \
}
+#define TBM_SURFACE_RETURN_ERR_IF_FAIL(cond, error_type) {\
+ if (!(cond)) {\
+ TBM_ERR("'%s' failed.\n", #cond);\
+ _tbm_set_last_result(error_type);\
+ _tbm_surface_mutex_unlock();\
+ return;\
+ } \
+}
+
+#define TBM_SURFACE_RETURN_SET_ERR_IF_FAIL(cond, error, error_type) {\
+ if (!(cond)) {\
+ TBM_ERR("'%s' failed.\n", #cond);\
+ error = error_type;\
+ _tbm_set_last_result(error_type);\
+ _tbm_surface_mutex_unlock();\
+ return;\
+ } \
+}
+
#define TBM_SURFACE_RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
TBM_ERR("'%s' failed.\n", #cond);\
} \
}
+
+#define TBM_SURFACE_RETURN_VAL_ERR_IF_FAIL(cond, val, error_type) {\
+ if (!(cond)) {\
+ TBM_ERR("'%s' failed.\n", #cond);\
+ _tbm_set_last_result(error_type);\
+ _tbm_surface_mutex_unlock();\
+ return val;\
+ } \
+}
+
+#define TBM_SURFACE_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
+ if (!(cond)) {\
+ TBM_ERR("'%s' failed.\n", #cond);\
+ error = error_type;\
+ _tbm_set_last_result(error_type);\
+ _tbm_surface_mutex_unlock();\
+ return val;\
+ } \
+}
+
/* LCOV_EXCL_START */
static double
_tbm_surface_internal_get_time(void)