[mutter/gbsneto/explicit-framebuffer-preparations: 9/11] clutter-wayland-surface: Remove cogl_rectangle()



commit 333aa9d67af648815fd7830053194a616020a31d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Nov 8 20:57:32 2018 -0200

    clutter-wayland-surface: Remove cogl_rectangle()
    
    This is a very straightforward port too: simply replacing
    cogl_rectangle() by cogl_framebuffer_draw_rectangle().

 clutter/clutter/wayland/clutter-wayland-surface.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/wayland/clutter-wayland-surface.c 
b/clutter/clutter/wayland/clutter-wayland-surface.c
index 12abe9cc7..288601a4d 100644
--- a/clutter/clutter/wayland/clutter-wayland-surface.c
+++ b/clutter/clutter/wayland/clutter-wayland-surface.c
@@ -321,11 +321,13 @@ static void
 clutter_wayland_surface_paint (ClutterActor *self)
 {
   ClutterWaylandSurfacePrivate *priv;
+  CoglFramebuffer *framebuffer;
   ClutterActorBox box;
 
   g_return_if_fail (CLUTTER_WAYLAND_IS_SURFACE (self));
 
   priv = CLUTTER_WAYLAND_SURFACE (self)->priv;
+  framebuffer = cogl_get_draw_framebuffer ();
 
   if (G_UNLIKELY (priv->pipeline == NULL))
     {
@@ -343,9 +345,11 @@ clutter_wayland_surface_paint (ClutterActor *self)
                                        COGL_TEXTURE (priv->buffer));
     }
 
-  cogl_set_source (priv->pipeline);
   clutter_actor_get_allocation_box (self, &box);
-  cogl_rectangle (0, 0, box.x2 - box.x1, box.y2 - box.y1);
+  cogl_framebuffer_draw_rectangle (framebuffer,
+                                   priv->pipeline,
+                                   0, 0,
+                                   box.x2 - box.x1, box.y2 - box.y1);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]