[gnome-shell/gbsneto/explicit-framebuffer-preparation: 1/3] theme-node-transition: Receive a CoglFramebuffer
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/explicit-framebuffer-preparation: 1/3] theme-node-transition: Receive a CoglFramebuffer
- Date: Thu, 8 Nov 2018 20:38:44 +0000 (UTC)
commit b6a5a53696a56146fd27f9be596a59362d21f866
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Oct 5 22:28:10 2018 -0300
theme-node-transition: Receive a CoglFramebuffer
This is in preparation for a future where only explicit frambuffer
APIs are available, i.e., cogl_get_draw_framebuffer() does not
exist.
There is absolutely no functional changes in this patch (nor the
following ones in this series), only rearrangements so that various
functions receive a CoglFramebuffer instead of using the draw
framebuffer.
src/st/st-theme-node-transition.c | 5 +++--
src/st/st-theme-node-transition.h | 1 +
src/st/st-widget.c | 5 ++++-
3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c
index afde97769..ba16be57c 100644
--- a/src/st/st-theme-node-transition.c
+++ b/src/st/st-theme-node-transition.c
@@ -345,11 +345,11 @@ setup_framebuffers (StThemeNodeTransition *transition,
void
st_theme_node_transition_paint (StThemeNodeTransition *transition,
+ CoglFramebuffer *framebuffer,
ClutterActorBox *allocation,
guint8 paint_opacity)
{
StThemeNodeTransitionPrivate *priv = transition->priv;
- CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
CoglColor constant;
float tex_coords[] = {
@@ -382,7 +382,8 @@ st_theme_node_transition_paint (StThemeNodeTransition *transition,
paint_opacity, paint_opacity,
paint_opacity, paint_opacity);
- cogl_framebuffer_draw_multitextured_rectangle (fb, priv->material,
+ cogl_framebuffer_draw_multitextured_rectangle (framebuffer,
+ priv->material,
priv->offscreen_box.x1,
priv->offscreen_box.y1,
priv->offscreen_box.x2,
diff --git a/src/st/st-theme-node-transition.h b/src/st/st-theme-node-transition.h
index 8762b6d31..6f45ab834 100644
--- a/src/st/st-theme-node-transition.h
+++ b/src/st/st-theme-node-transition.h
@@ -41,6 +41,7 @@ void st_theme_node_transition_update (StThemeNodeTransition *transition,
StThemeNode *new_node);
void st_theme_node_transition_paint (StThemeNodeTransition *transition,
+ CoglFramebuffer *framebuffer,
ClutterActorBox *allocation,
guint8 paint_opacity);
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index db984ac9b..56ecd20b5 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -441,10 +441,12 @@ void
st_widget_paint_background (StWidget *widget)
{
StWidgetPrivate *priv = st_widget_get_instance_private (widget);
+ CoglFramebuffer *framebuffer;
StThemeNode *theme_node;
ClutterActorBox allocation;
guint8 opacity;
+ framebuffer = cogl_get_draw_framebuffer ();
theme_node = st_widget_get_theme_node (widget);
clutter_actor_get_allocation_box (CLUTTER_ACTOR (widget), &allocation);
@@ -453,12 +455,13 @@ st_widget_paint_background (StWidget *widget)
if (priv->transition_animation)
st_theme_node_transition_paint (priv->transition_animation,
+ framebuffer,
&allocation,
opacity);
else
st_theme_node_paint (theme_node,
current_paint_state (widget),
- cogl_get_draw_framebuffer (),
+ framebuffer,
&allocation,
opacity);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]