add "focus" mode for render debug

This commit is contained in:
Mike Blumenkrantz 2017-07-07 16:26:32 -04:00
parent 836a99619b
commit 889c8c3167
1 changed files with 8 additions and 3 deletions

View File

@ -48,8 +48,8 @@
/* enable along with display-specific damage INF calls to enable render tracing /* enable along with display-specific damage INF calls to enable render tracing
* SLOW! * SLOW!
*/ */
static Eina_Bool render_debug_enabled; static int render_debug_enabled;
#define RENDER_DEBUG(...) do { if (render_debug_enabled) INF(__VA_ARGS__); } while (0) #define RENDER_DEBUG(...) do { if ((render_debug_enabled == 1) || ((render_debug_enabled == -1) && cw->ec->focused)) INF(__VA_ARGS__); } while (0)
typedef struct _E_Comp_Object typedef struct _E_Comp_Object
{ {
@ -2578,9 +2578,14 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
static void static void
_e_comp_smart_init(void) _e_comp_smart_init(void)
{ {
const char *env;
if (_e_comp_smart) return; if (_e_comp_smart) return;
render_debug_enabled = !!getenv("E_RENDER_DEBUG"); env = getenv("E_RENDER_DEBUG");
if (eina_streq(env, "focus"))
render_debug_enabled = -1;
else if (env)
render_debug_enabled = 1;
{ {
static const Evas_Smart_Class sc = static const Evas_Smart_Class sc =
{ {