[clutter] actor: Use the real opacity when clearing the stage
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] actor: Use the real opacity when clearing the stage
- Date: Thu, 30 Apr 2015 11:58:01 +0000 (UTC)
commit 8b8aa0b4927bc865b08b77b4e28237da0ff8597c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Apr 30 12:40:39 2015 +0100
actor: Use the real opacity when clearing the stage
The paint opacity for a top level is always overridden to be the full
value, since it's a composited value and we want to paint our scene.
When clearing the stage framebuffer, though, we want to use the actual
opacity, if ClutterStage:use-alpha is set.
clutter/clutter-actor.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index eaf2ef8..fd0b8a9 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -3665,13 +3665,19 @@ clutter_actor_paint_node (ClutterActor *actor,
if (clutter_stage_get_use_alpha (CLUTTER_STAGE (actor)))
{
- bg_color.alpha = clutter_actor_get_paint_opacity_internal (actor)
+ bg_color.alpha = priv->opacity
* priv->bg_color.alpha
/ 255;
}
else
bg_color.alpha = 255;
+ CLUTTER_NOTE (PAINT, "Stage clear color: (%d, %d, %d, %d)",
+ bg_color.red,
+ bg_color.green,
+ bg_color.blue,
+ bg_color.alpha);
+
clear_flags = COGL_BUFFER_BIT_DEPTH;
if (!clutter_stage_get_no_clear_hint (CLUTTER_STAGE (actor)))
clear_flags |= COGL_BUFFER_BIT_COLOR;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]