[cheese] Replace some stray references to ClutterTexture



commit ec346d74821444506fca27dbd43ff4ab32872bfd
Author: David King <amigadave amigadave com>
Date:   Tue Sep 22 11:54:23 2015 +0100

    Replace some stray references to ClutterTexture
    
    Fix rendering into effects previews, although the size of the previews
    is still incorrect.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755084

 libcheese/cheese-camera.c |    4 ++--
 src/cheese-window.vala    |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 0d90a0b..49ac1c0 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -995,7 +995,7 @@ cheese_camera_connected_size_change_cb (ClutterGstContent *content, gint width,
  * cheese_camera_connect_effect_texture:
  * @camera: a #CheeseCamera
  * @effect: a #CheeseEffect
- * @texture: a #ClutterTexture
+ * @texture: a #ClutterActor
  *
  * Connect the supplied @texture to the @camera, using @effect.
  */
@@ -1476,7 +1476,7 @@ cheese_camera_init (CheeseCamera *camera)
 
 /**
  * cheese_camera_new:
- * @video_texture: a #ClutterTexture
+ * @video_texture: an actor in which to render the video
  * @name: (allow-none): the name of the device
  * @x_resolution: the resolution width
  * @y_resolution: the resolution height
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 2d2b815..224a7b0 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -1029,7 +1029,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
         {
             if (!effect.is_preview_connected ())
             {
-                Clutter.Texture texture = effect.get_data<Clutter.Texture> ("texture");
+                Clutter.Actor texture = effect.get_data<Clutter.Actor> ("texture");
                 camera.connect_effect_texture (effect, texture);
             }
             effect.enable_preview ();
@@ -1135,9 +1135,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
       uint i = 0;
       foreach (var effect in effects_manager.effects)
       {
-        Clutter.Texture   texture = new Clutter.Texture ();
-        Clutter.BinLayout layout  = new Clutter.BinLayout (Clutter.BinAlignment.CENTER,
-                                                           Clutter.BinAlignment.CENTER);
+        Clutter.Actor texture = new Clutter.Actor ();
+        Clutter.BinLayout layout = new Clutter.BinLayout (Clutter.BinAlignment.CENTER,
+                                                          Clutter.BinAlignment.CENTER);
         var box = new Clutter.Actor ();
         box.set_layout_manager (layout);
         Clutter.Text      text = new Clutter.Text ();
@@ -1146,7 +1146,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
         rect.opacity = 128;
         rect.background_color = Clutter.Color.from_string ("black");
 
-        texture.keep_aspect_ratio = true;
+        texture.content_gravity = Clutter.ContentGravity.RESIZE_ASPECT;
         box.add_child (texture);
         box.reactive = true;
         var tap = new Clutter.TapAction ();


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