When a canvas is manually rendered the ticker is just a waste of cpu, and
worse - it can wake the drm back-end from dpms sleep, as the display needs
to be awake to generate vblanks.
We fire a DBG message when attempting to start an animator in this state
because it's frequently a bug that wastes battery life - (like E doing idle
cursor animations or clock updates while the display is off)
However, dpms off is not the only potential usage of manual render, so
another commit will follow shortly to fix the bug this commit introduces -
when using a backend with a custom ticker and doing manual render with
the display on, calling ecore_evas_manual_render() will not draw with
updated animator state.
Fix T5462
Again.
Really.
{
ECORE_EVAS_CHECK(ee);
ee->manual_render = manual_render;
+ if (!ee->anim_count) return;
+ if (!ee->engine.func->fn_animator_register) return;
+ if (!ee->engine.func->fn_animator_unregister) return;
+
+ if (manual_render)
+ ee->engine.func->fn_animator_unregister(ee);
+ else
+ ee->engine.func->fn_animator_register(ee);
}
EAPI Eina_Bool
if (ee->anim_count++ > 0) return;
+ if (ee->manual_render)
+ {
+ DBG("Attempt to schedule tick for manually rendered canvas.");
+ return;
+ }
ee->engine.func->fn_animator_register(ee);
}
if ((--ee->anim_count) > 0) return;
+ if (ee->manual_render) return;
+
ee->engine.func->fn_animator_unregister(ee);
}