Fix 1499921 (debian #365102): synfigstudio startup crashes on amd64
[synfig.git] / synfig-studio / trunk / src / gtkmm / asyncrenderer.cpp
index 9c41444..b2de087 100644 (file)
@@ -1,20 +1,21 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file asyncrenderer.cpp
 **     \brief Template File
 **
 **     $Id: asyncrenderer.cpp,v 1.5 2005/01/12 07:03:42 darco Exp $
 **
 **     \legal
-**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **
-**     This software and associated documentation
-**     are CONFIDENTIAL and PROPRIETARY property of
-**     the above-mentioned copyright holder.
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
 **
-**     You may not copy, print, publish, or in any
-**     other way distribute this software without
-**     a prior written agreement with
-**     the copyright holder.
+**     This package is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+**     General Public License for more details.
 **     \endlegal
 */
 /* ========================================================================= */
@@ -48,7 +49,7 @@
 #include <signal.h>
 #endif
 
-#include <sinfg/general.h>
+#include <synfig/general.h>
 #include <ETL/clock>
 
 #endif
@@ -57,7 +58,7 @@
 
 using namespace std;
 using namespace etl;
-using namespace sinfg;
+using namespace synfig;
 using namespace studio;
 
 #define BOREDOM_TIMEOUT                50
@@ -70,10 +71,10 @@ using namespace studio;
 
 /* === C L A S S E S ======================================================= */
 
-class AsyncTarget_Tile : public sinfg::Target_Tile
+class AsyncTarget_Tile : public synfig::Target_Tile
 {
 public:
-       etl::handle<sinfg::Target_Tile> warm_target;
+       etl::handle<synfig::Target_Tile> warm_target;
        
        struct tile_t
        {
@@ -97,7 +98,7 @@ public:
        sigc::connection ready_connection;
        
 public:
-       AsyncTarget_Tile(etl::handle<sinfg::Target_Tile> warm_target):
+       AsyncTarget_Tile(etl::handle<synfig::Target_Tile> warm_target):
                warm_target(warm_target)
        {
                set_avoid_time_sync(warm_target->get_avoid_time_sync());
@@ -145,14 +146,14 @@ public:
                return warm_target->next_frame(time);
        }
        
-       virtual bool start_frame(sinfg::ProgressCallback *cb=0)
+       virtual bool start_frame(synfig::ProgressCallback *cb=0)
        {
                if(!alive_flag)
                        return false;
                return warm_target->start_frame(cb);
        }
        
-       virtual bool add_tile(const sinfg::Surface &surface, int gx, int gy)
+       virtual bool add_tile(const synfig::Surface &surface, int gx, int gy)
        {
                assert(surface);
                if(!alive_flag)
@@ -219,10 +220,10 @@ public:
 
 
 
-class AsyncTarget_Scanline : public sinfg::Target_Scanline
+class AsyncTarget_Scanline : public synfig::Target_Scanline
 {
 public:
-       etl::handle<sinfg::Target_Scanline> warm_target;
+       etl::handle<synfig::Target_Scanline> warm_target;
        
        int scanline_;
        Surface surface;
@@ -239,7 +240,7 @@ public:
 
 
 public:
-       AsyncTarget_Scanline(etl::handle<sinfg::Target_Scanline> warm_target):
+       AsyncTarget_Scanline(etl::handle<synfig::Target_Scanline> warm_target):
                warm_target(warm_target)
        {
                set_avoid_time_sync(warm_target->get_avoid_time_sync());
@@ -274,7 +275,7 @@ public:
                alive_flag=false;
        }
        
-       virtual bool start_frame(sinfg::ProgressCallback *cb=0)
+       virtual bool start_frame(synfig::ProgressCallback *cb=0)
        {               
                return alive_flag;
        }
@@ -338,27 +339,27 @@ public:
 
 /* === M E T H O D S ======================================================= */
 
-AsyncRenderer::AsyncRenderer(etl::handle<sinfg::Target> target_,sinfg::ProgressCallback *cb):
+AsyncRenderer::AsyncRenderer(etl::handle<synfig::Target> target_,synfig::ProgressCallback *cb):
        error(false),
        success(false),
        cb(cb)
 {
        render_thread=0;
-       if(etl::handle<sinfg::Target_Tile>::cast_dynamic(target_))
+       if(etl::handle<synfig::Target_Tile>::cast_dynamic(target_))
        {
                etl::handle<AsyncTarget_Tile> wrap_target(
-                       new AsyncTarget_Tile(etl::handle<sinfg::Target_Tile>::cast_dynamic(target_))
+                       new AsyncTarget_Tile(etl::handle<synfig::Target_Tile>::cast_dynamic(target_))
                );
                
                signal_stop_.connect(sigc::mem_fun(*wrap_target,&AsyncTarget_Tile::set_dead));
                
                target=wrap_target;
        }
-       else if(etl::handle<sinfg::Target_Scanline>::cast_dynamic(target_))
+       else if(etl::handle<synfig::Target_Scanline>::cast_dynamic(target_))
        {
                etl::handle<AsyncTarget_Scanline> wrap_target(
                        new AsyncTarget_Scanline(
-                               etl::handle<sinfg::Target_Scanline>::cast_dynamic(target_)
+                               etl::handle<synfig::Target_Scanline>::cast_dynamic(target_)
                        )
                );