[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/server dlist.cpp dlist.h
From: |
Vitaly Alexeev |
Subject: |
[Gnash-commit] gnash/server dlist.cpp dlist.h |
Date: |
Thu, 17 Aug 2006 19:02:10 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Vitaly Alexeev <alexeev> 06/08/17 19:02:10
Modified files:
server : dlist.cpp dlist.h
Log message:
Macromedia Flash does not call remove display object tag for 1-st frame
therefore we should do it for it :-)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: dlist.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- dlist.cpp 10 Aug 2006 08:39:49 -0000 1.18
+++ dlist.cpp 17 Aug 2006 19:02:10 -0000 1.19
@@ -368,6 +368,36 @@
_characters.clear();
}
+void DisplayList::clear_unaffected(std::vector<uint16>& affected_depths)
+{
+ //GNASH_REPORT_FUNCTION;
+
+ for (iterator it = _characters.begin(), itEnd = _characters.end(); it
!= itEnd; )
+ {
+ DisplayItem& di = *it;
+
+ int di_depth = di.get_ptr()->get_depth();
+ bool is_affected = false;
+
+ for (int i = 0; i < affected_depths.size(); i++)
+ {
+ if (affected_depths[i] != di_depth)
+ {
+ continue;
+ }
+ is_affected = true;
+ break;
+ }
+
+ if (is_affected == false)
+ {
+ di->on_event(event_id::UNLOAD);
+ it = _characters.erase(it);
+ continue;
+ }
+ it++;
+ }
+}
// reset the references to the display list.
void
Index: dlist.h
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- dlist.h 29 May 2006 12:49:34 -0000 1.6
+++ dlist.h 17 Aug 2006 19:02:10 -0000 1.7
@@ -144,6 +144,16 @@
/// on each item still present
void clear();
+ //Vitaly:
+ // It is executed only before the second and the subsequent
+ // execution of execute_frame_tags(0) for sprite_instance
+ // with frame count > 1.
+ // Deletes the display objects created during execution
+ // of frames 2,... and not displayed in the 1-st frame.
+ // Macromedia Flash does not call remove display object tag
+ // for 1-st frame
+ void clear_unaffected(std::vector<uint16>& affected_depths);
+
/// \brief
/// Clear the display list, w/out calling the UNLOAD event
/// on the items.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/server dlist.cpp dlist.h,
Vitaly Alexeev <=