[ease] Use one single CairoContext
- From: Stéphane Maniaci <maniacis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] Use one single CairoContext
- Date: Mon, 16 Aug 2010 19:58:46 +0000 (UTC)
commit f4607bfb14f64e99773baede83562a369c024120
Author: Stéphane Maniaci <stephane maniaci gmail com>
Date: Mon Aug 16 14:46:49 2010 -0500
Use one single CairoContext
ease/ease-player.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/ease/ease-player.vala b/ease/ease-player.vala
index b6c827b..f79506f 100644
--- a/ease/ease-player.vala
+++ b/ease/ease-player.vala
@@ -49,6 +49,7 @@ internal class Ease.Player : Gtk.Window
// focus actors
private Clutter.CairoTexture focus_circle;
private Cairo.Pattern radial;
+ private Cairo.Context cr;
internal signal void complete();
@@ -151,13 +152,14 @@ internal class Ease.Player : Gtk.Window
{
if (dragging) {
focus_circle.clear ();
- var cr = focus_circle.create ();
-
+ cr = focus_circle.create ();
+
cr.translate (event.x, event.y);
cr.set_source (radial);
cr.paint ();
+ cr = null;
stage.raise_child (focus_circle, null);
} else {
// fade out
@@ -178,13 +180,14 @@ internal class Ease.Player : Gtk.Window
debug ("Got a mouse click at %f, %f", event.x, event.y);
focus_circle.clear ();
- var cr = focus_circle.create ();
+ cr = focus_circle.create ();
cr.translate (event.x, event.y);
cr.set_source (radial);
cr.paint ();
+ cr = null;
stage.raise_child (focus_circle, null);
focus_circle.animate (Clutter.AnimationMode.LINEAR, 150,
"opacity", FOCUS_OPACITY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]