gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ./ChangeLog libbase/triangulate.h libbase...


From: Rob Savoye
Subject: [Gnash-commit] gnash ./ChangeLog libbase/triangulate.h libbase...
Date: Thu, 05 Jan 2006 18:28:32 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         
Changes by:     Rob Savoye <address@hidden>     06/01/05 18:28:32

Modified files:
        .              : ChangeLog 
        libbase        : triangulate.h triangulate_float.cpp 
                         triangulate_impl.h triangulate_sint32.cpp 

Log message:
        Migrate patch from GameSWF.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_float.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_impl.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_sint32.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.16 gnash/ChangeLog:1.17
--- gnash/ChangeLog:1.16        Tue Dec 27 19:20:19 2005
+++ gnash/ChangeLog     Thu Jan  5 18:28:32 2006
@@ -1,3 +1,10 @@
+2006-01-05  Rob Savoye  <address@hidden>
+
+       * libbase/triangulate.h: Migrate patch from GameSWF.
+       * libbase/triangulate_impl.h:  Migrate patch from GameSWF.
+       * libbase/triangulate_float.cpp:  Migrate patch from GameSWF.
+       * libbase/triangulate_sint32.cpp:  Migrate patch from GameSWF.
+
 2005-12-27  Rob Savoye  <address@hidden>
 
        * doc/C/gnash.xml: Add sections on software dependancies,
Index: gnash/libbase/triangulate.h
diff -u gnash/libbase/triangulate.h:1.1 gnash/libbase/triangulate.h:1.2
--- gnash/libbase/triangulate.h:1.1     Tue Dec 20 20:57:00 2005
+++ gnash/libbase/triangulate.h Thu Jan  5 18:28:32 2006
@@ -31,22 +31,26 @@
        void    compute(
                array<float>* results,
                int path_count,
-               const array<float> paths[]);
+               const array<float> paths[],
+               int debug_halt_step = -1,
+               array<float>* debug_remaining_loop = NULL);
 
        // Version using short coords
        void    compute(
                array<sint16>* results, // indexed trilist
                int path_count,
-               const array<sint16> paths[]);
+               const array<sint16> paths[],
+               int debug_halt_step = -1,
+               array<sint16>* debug_remaining_loop = NULL);
+
+       // Version using int coords
+       void    compute(
+               array<sint32>* results, // indexed trilist
+               int path_count,
+               const array<sint32> paths[],
+               int debug_halt_step = -1,
+               array<sint32>* debug_remaining_loop = NULL);
 }
 
 
 #endif // TRIANGULATE
-
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 8 
-// tab-width: 8
-// indent-tabs-mode: t
-// End:
Index: gnash/libbase/triangulate_float.cpp
diff -u gnash/libbase/triangulate_float.cpp:1.1 
gnash/libbase/triangulate_float.cpp:1.2
--- gnash/libbase/triangulate_float.cpp:1.1     Tue Dec 20 20:57:00 2005
+++ gnash/libbase/triangulate_float.cpp Thu Jan  5 18:28:32 2006
@@ -16,9 +16,11 @@
        void    compute(
                array<float>* result,   // trilist
                int path_count,
-               const array<float> paths[])
+               const array<float> paths[],
+               int debug_halt_step /* = -1 */,
+               array<float>* debug_remaining_loop /* = NULL */)
        {
-               compute_triangulation<float>(result, path_count, paths);
+               compute_triangulation<float>(result, path_count, paths, 
debug_halt_step, debug_remaining_loop);
        }
 }
 
@@ -73,10 +75,3 @@
 
 #endif // TEST_TRIANGULATE_FLOAT
 
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 8 
-// tab-width: 8
-// indent-tabs-mode: t
-// End:
Index: gnash/libbase/triangulate_impl.h
diff -u gnash/libbase/triangulate_impl.h:1.1 
gnash/libbase/triangulate_impl.h:1.2
--- gnash/libbase/triangulate_impl.h:1.1        Tue Dec 20 20:57:00 2005
+++ gnash/libbase/triangulate_impl.h    Thu Jan  5 18:28:32 2006
@@ -2202,8 +2202,13 @@
 static void compute_triangulation(
        array<coord_t>* result,
        int path_count,
-       const array<coord_t> paths[])
+       const array<coord_t> paths[],
+       int debug_halt_step,
+       array<coord_t>* debug_remaining_loop)
 // Compute triangulation.
+//
+// The debug_ args are optional; they're for terminating early and
+// returning the remaining loop to be triangulated.
 {
        if (path_count <= 0)
        {
@@ -2318,16 +2323,14 @@
                                P->emit_and_remove_ear(result, 
&penv.m_sorted_verts, v0, v1, v2);
                                ear_was_clipped = true;
 
-#if 0
-                               // debug hack: emit current state of P
-                               static int s_tricount = 0;
-                               s_tricount++;
-                               if (s_tricount >= 1)    // 79
-                               {
-                                       debug_emit_poly_loop(result, 
penv.m_sorted_verts, P);
+                               // For debugging -- terminate early if the 
debug counter hits zero.
+                               debug_halt_step--;
+                               if (debug_halt_step == 0) {
+                                       if (debug_remaining_loop) {
+                                               
debug_emit_poly_loop(debug_remaining_loop, penv.m_sorted_verts, P);
+                                       }
                                        return;
                                }
-#endif // HACK
                        }
                        else if (ear_was_clipped == true)
                        {
@@ -2348,6 +2351,7 @@
                                ear_was_clipped = false;
                        }
                }
+
                if (P->get_vertex_count() == 3)
                {
                        // Emit the final triangle.
@@ -2366,7 +2370,7 @@
                }
                delete P;
        }
-
+       
 #ifdef PROFILE_TRIANGULATE
        uint64  clip_ticks = tu_timer::get_profile_ticks();
        fprintf(stderr, "clip poly = %1.6f sec\n", 
tu_timer::profile_ticks_to_seconds(clip_ticks - join_ticks));
@@ -2497,11 +2501,3 @@
        // Resume.
        return;
 }
-
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 8
-// tab-width: 8
-// indent-tabs-mode: t
-// End:
Index: gnash/libbase/triangulate_sint32.cpp
diff -u gnash/libbase/triangulate_sint32.cpp:1.1 
gnash/libbase/triangulate_sint32.cpp:1.2
--- gnash/libbase/triangulate_sint32.cpp:1.1    Tue Dec 20 20:57:00 2005
+++ gnash/libbase/triangulate_sint32.cpp        Thu Jan  5 18:28:32 2006
@@ -16,16 +16,10 @@
        void    compute(
                array<sint32>* result,  // trilist
                int path_count,
-               const array<sint32> paths[])
+               const array<sint32> paths[],
+               int debug_halt_step /* = -1 */,
+               array<sint32>* debug_remaining_loop /* = NULL */)
        {
-               compute_triangulation<sint32>(result, path_count, paths);
+               compute_triangulation<sint32>(result, path_count, paths, 
debug_halt_step, debug_remaining_loop);
        }
 }
-
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 8 
-// tab-width: 8
-// indent-tabs-mode: t
-// End:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]