[mutter/wip/dnd-surface2: 9/18] backend: Add meta_overlay_copy()



commit 572727e6e85219ec78ae85cfeea58ef4ce22416a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Sep 30 16:51:30 2014 +0200

    backend: Add meta_overlay_copy()
    
    This function will be useful to transfer an overlay so it can be
    temporarily rendered differently. Will be mainly useful for DnD
    animations.

 src/backends/meta-stage.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c
index c0cbd76..72c5091 100644
--- a/src/backends/meta-stage.c
+++ b/src/backends/meta-stage.c
@@ -56,6 +56,15 @@ meta_overlay_init (MetaOverlay *overlay)
 }
 
 static void
+meta_overlay_copy (MetaOverlay *src,
+                   MetaOverlay *dst)
+{
+  *dst = *src;
+  dst->pipeline = cogl_pipeline_copy (src->pipeline);
+  dst->texture = src->texture;
+}
+
+static void
 meta_overlay_free (MetaOverlay *overlay)
 {
   if (overlay->pipeline)


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