Skip to content

clutter/effect: Don't call effect paint_node() if pre_paint() failed

Some effects such as the BrightnessContrastEffect try to skip rendering by returning early with a FALSE return value in pre_paint() in cases where the effect would not change the rendering. This stopped working when effects were ported to paint nodes.

In the case of OffscreenEffects, like BrightnessContrastEffect, pre_paint() is responsible for setting up the offscreen buffer which is then used in paint_node(). However if pre_paint() fails, this buffer is not created and attempting to use it will result in several error messages and broken rendering.

Instead of trying to call paint_node() of the effect if pre_paint() failed, just draw the actor.

Fixes #1576 (closed)

Merge request reports