gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. b841ae61e0b499c8fed2


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. b841ae61e0b499c8fed20403d16f7d47512f3f1d
Date: Thu, 26 Aug 2010 06:37:23 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  b841ae61e0b499c8fed20403d16f7d47512f3f1d (commit)
       via  1f19d08c5f98a12bb2b3b2e58142a4fd0e330ecb (commit)
       via  98238559425d59ddd2c02a1aaf4e0655a809f89d (commit)
       via  bee8eca3fc1cdcc90945c9325261577fac866207 (commit)
       via  d32e8d2bb9d1e33414c258bbd09d2eb165bc504c (commit)
       via  22d5d2db243ba88eb094cc4ddfba8f56d7e03cfa (commit)
      from  bf85187ffdd6a6cbec818bb551624c5f08001713 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=b841ae61e0b499c8fed20403d16f7d47512f3f1d


commit b841ae61e0b499c8fed20403d16f7d47512f3f1d
Merge: bf85187 1f19d08
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Aug 26 08:14:07 2010 +0200

    Merge branch 'work'


http://git.savannah.gnu.org/cgit//commit/?id=1f19d08c5f98a12bb2b3b2e58142a4fd0e330ecb


commit 1f19d08c5f98a12bb2b3b2e58142a4fd0e330ecb
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Aug 26 08:05:56 2010 +0200

    We use git.

diff --git a/README_bzr b/README_bzr
deleted file mode 100644
index dffa973..0000000
--- a/README_bzr
+++ /dev/null
@@ -1,57 +0,0 @@
-
-               Building Gnash from its bzr repository
-
-The source code of Gnash is checked into a bzr repository.  (See the main
-web page for Gnash for the current details on where that repository is.)
-The instructions for building Gnash in README and INSTALL assume that
-you are starting from a released "tarball" (e.g. gnash-VERSION.tar.gz).
-The tarball contains some files that are not in the original source code
-in bzr.  They are generated using tools that not everyone is expected
-to have.  This simplifies the process of building Gnash releases, for
-ordinary people.
-
-People who are actively working on maintaining Gnash need to have these
-extra tools.  They are used to build configuration files, international
-message translation catalogs, and such.  After you check out the source
-code of Gnash from bzr, you'll have to run a single script that rebuilds
-all these files.  This script is called "./autogen.sh", and it lives
-in the top-level directory of gnash.  You run it without any arguments.
-When it finishes, you can run "./configure", with or without arguments,
-as instructed in the README and INSTALL files.
-
-A variety of GNU programs are required when checking out the
-bzr tree and building the auto-generated files.  If anything is
-missing, ./autogen.sh will (probably) tell you, or produce a relatively
-understandable error message.  When in doubt, look at the *first*
-error message.  Here are the programs required:
-
-GNU            Minimum         RPM or DEB package names:
-Package                Version  Debian         Ubuntu          Fedora          
Gentoo
--------         -------  -----------    ------------    ---------      
----------
-automake       1.9.6   automake1.9     automake1.9     automake
-autoconf       2.59                    autoconf        autoconf
-bzr            1.3                     bzr             bzr
-gettext                0.14.6                  gettext         gettext
-libtool                1.5.22                  libtool         libtool
-               1.5.22                  libltdl3-dev    libtool
-
-The "Minimum Version" is not necessarily the lowest version that will work;
-it's the lowest version that the Gnash team has recently tested with.  
-(You'll also need some very common tools, for example the standard Unix/GNU
-core utilities (ls, mv); text utilities (grep, sed), and shell (sh).
-Unless your system is very unusual, these will already be installed.)
-
-The version dependencies among these tools are, unfortunately, more
-complicated than we can describe here.  When ./autogen.sh is failing
-for you, either upgrade all the things in the above table to the latest
-version available (which may break other packages you're trying to build),
-or seek a compatible set of tools, perhaps the set that comes by default
-in your operating system (if any).
-
-If you are unable to run ./autogen.sh successfully on your system, consider
-building Gnash from a tarball release.  Or, move the bzr tree to a system
-on which you can run ./autogen.sh successfully, then move it back to the
-system you are trying to build on.
-
-Once ./autogen.sh completes successfully, you can go on with the normal
-instructions found in the README file.

http://git.savannah.gnu.org/cgit//commit/?id=98238559425d59ddd2c02a1aaf4e0655a809f89d


commit 98238559425d59ddd2c02a1aaf4e0655a809f89d
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Aug 25 20:12:03 2010 +0200

    Fix testsuite.

diff --git a/testsuite/movies.all/gravity_embedded-TestRunner.cpp 
b/testsuite/movies.all/gravity_embedded-TestRunner.cpp
index a1967fa..53dd62c 100644
--- a/testsuite/movies.all/gravity_embedded-TestRunner.cpp
+++ b/testsuite/movies.all/gravity_embedded-TestRunner.cpp
@@ -66,7 +66,7 @@ main(int /*argc*/, char** /*argv*/)
 
        const DisplayObject* loaded = tester.findDisplayItemByDepth(*root, 0); 
// depends on getNextHighestDepth
        check(loaded);
-       check_equals(loaded->get_parent(), root);
+       check_equals(loaded->parent(), root);
 
        string_table& st = VM::get().getStringTable();
        string_table::key xscale = st.find("_xscale");

http://git.savannah.gnu.org/cgit//commit/?id=bee8eca3fc1cdcc90945c9325261577fac866207


commit bee8eca3fc1cdcc90945c9325261577fac866207
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Aug 25 20:02:12 2010 +0200

    Move functions to header.

diff --git a/libcore/DisplayObject.cpp b/libcore/DisplayObject.cpp
index 4c7837a..a608011 100644
--- a/libcore/DisplayObject.cpp
+++ b/libcore/DisplayObject.cpp
@@ -1007,24 +1007,6 @@ DisplayObject::MaskRenderer::~MaskRenderer()
     if (_mask) _renderer.disable_mask();
 }
 
-SWFMatrix
-getWorldMatrix(const DisplayObject& d, bool includeRoot)
-{
-       SWFMatrix m = d.parent() ?
-        getWorldMatrix(*d.parent(), includeRoot) : SWFMatrix();
-
-    if (d.parent() || includeRoot) m.concatenate(getMatrix(d));
-       return m;
-}
-
-SWFCxForm
-getWorldCxForm(const DisplayObject& d) 
-{
-       SWFCxForm cx = d.parent() ? getWorldCxForm(*d.parent()) : SWFCxForm();
-       cx.concatenate(getCxForm(d));
-       return cx;
-}
-        
 namespace {
 
 as_value
diff --git a/libcore/DisplayObject.h b/libcore/DisplayObject.h
index 3b246f5..0f98f7c 100644
--- a/libcore/DisplayObject.h
+++ b/libcore/DisplayObject.h
@@ -126,8 +126,7 @@ void copyMatrix(const DisplayObject& from, DisplayObject& 
to);
 /// @param includeRoot      Whether the transform of the Stage (_root)
 ///                         should be concatenated. This is required to be
 ///                         false for pointInBounds.
-DSOEXPORT SWFMatrix getWorldMatrix(const DisplayObject& d,
-        bool includeRoot = true);
+SWFMatrix getWorldMatrix(const DisplayObject& d, bool includeRoot = true);
 
 /// Get concatenated color transform of a DisplayObject
 //
@@ -1127,6 +1126,23 @@ getCxForm(const DisplayObject& o)
     return o.transform().colorTransform;
 }
 
+inline SWFMatrix
+getWorldMatrix(const DisplayObject& d, bool includeRoot)
+{
+    SWFMatrix m = d.parent() ?
+        getWorldMatrix(*d.parent(), includeRoot) : SWFMatrix();
+
+    if (d.parent() || includeRoot) m.concatenate(getMatrix(d));
+    return m;
+}
+
+inline SWFCxForm
+getWorldCxForm(const DisplayObject& d)
+{
+    SWFCxForm cx = d.parent() ? getWorldCxForm(*d.parent()) : SWFCxForm();
+    cx.concatenate(getCxForm(d));
+    return cx;
+}
 
 inline bool
 isReferenceable(const DisplayObject& d)

http://git.savannah.gnu.org/cgit//commit/?id=d32e8d2bb9d1e33414c258bbd09d2eb165bc504c


commit d32e8d2bb9d1e33414c258bbd09d2eb165bc504c
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Aug 25 19:47:49 2010 +0200

    Cleanup, fix bug from last commit.

diff --git a/libcore/Button.cpp b/libcore/Button.cpp
index 3fd3351..5d03613 100644
--- a/libcore/Button.cpp
+++ b/libcore/Button.cpp
@@ -287,9 +287,9 @@ attachButtonInterface(as_object& o)
 }
 
 Button::Button(as_object* object, const SWF::DefineButtonTag* def,
-        DisplayObject* p)
+        DisplayObject* parent)
     :
-    InteractiveObject(object, p),
+    InteractiveObject(object, parent),
     _mouseState(MOUSESTATE_UP),
     _def(def)
 {
diff --git a/libcore/DisplayList.cpp b/libcore/DisplayList.cpp
index 36d7979..64f264b 100644
--- a/libcore/DisplayList.cpp
+++ b/libcore/DisplayList.cpp
@@ -443,7 +443,7 @@ DisplayList::swapDepths(DisplayObject* ch1, int newdepth)
         ch2->set_depth(srcdepth);
 
         // TODO: we're not actually invalidated ourselves, rather 
-        // our p is...
+        // our parent is...
         ch2->set_invalidated();
 
         // We won't accept static transforms after a depth swap.
@@ -466,7 +466,7 @@ DisplayList::swapDepths(DisplayObject* ch1, int newdepth)
     // we'll need it to assign to the new DisplayObject
     ch1->set_depth(newdepth);
 
-    // TODO: we're not actually invalidated ourselves, rather our p is...
+    // TODO: we're not actually invalidated ourselves, rather our parent is...
     //             UdoG ? Want to verify this ?
     ch1->set_invalidated();
 
diff --git a/libcore/asobj/MovieClip_as.cpp b/libcore/asobj/MovieClip_as.cpp
index b0aec02..d65dbd6 100644
--- a/libcore/asobj/MovieClip_as.cpp
+++ b/libcore/asobj/MovieClip_as.cpp
@@ -1230,8 +1230,8 @@ movieclip_getBounds(const fn_call& fn)
             return as_value();
         }
 
-        const SWFMatrix tgtwmat = getWorldMatrix(*target);
-        const SWFMatrix srcwmat = getWorldMatrix(*movieclip).invert();
+        const SWFMatrix tgtwmat = getWorldMatrix(*target).invert();
+        const SWFMatrix srcwmat = getWorldMatrix(*movieclip);
 
         srcwmat.transform(bounds);
         tgtwmat.transform(bounds);

http://git.savannah.gnu.org/cgit//commit/?id=22d5d2db243ba88eb094cc4ddfba8f56d7e03cfa


commit 22d5d2db243ba88eb094cc4ddfba8f56d7e03cfa
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Aug 25 19:08:16 2010 +0200

    Move functions outside class and const correct.

diff --git a/libcore/Bitmap.cpp b/libcore/Bitmap.cpp
index 0117f60..9a3573a 100644
--- a/libcore/Bitmap.cpp
+++ b/libcore/Bitmap.cpp
@@ -127,7 +127,7 @@ Bitmap::add_invalidated_bounds(InvalidatedRanges& ranges, 
bool force)
     ranges.add(m_old_invalidated_ranges);
 
     SWFRect bounds;
-    bounds.expand_to_transformed_rect(getWorldMatrix(), getBounds()); 
+    bounds.expand_to_transformed_rect(getWorldMatrix(*this), getBounds()); 
     ranges.add(bounds.getRange());
 
 }
diff --git a/libcore/Button.cpp b/libcore/Button.cpp
index 6e28354..3fd3351 100644
--- a/libcore/Button.cpp
+++ b/libcore/Button.cpp
@@ -287,9 +287,9 @@ attachButtonInterface(as_object& o)
 }
 
 Button::Button(as_object* object, const SWF::DefineButtonTag* def,
-        DisplayObject* parent)
+        DisplayObject* p)
     :
-    InteractiveObject(object, parent),
+    InteractiveObject(object, p),
     _mouseState(MOUSESTATE_UP),
     _def(def)
 {
@@ -420,13 +420,12 @@ Button::topmostMouseEntity(boost::int32_t x, 
boost::int32_t y)
     // Find hit DisplayObjects
     if ( _hitCharacters.empty() ) return 0;
 
-    // point is in parent's space,
+    // point is in p's space,
     // we need to convert it in world space
     point  wp(x,y);
-    DisplayObject* parent = get_parent();
-    if ( parent )
-    {
-        parent->getWorldMatrix().transform(wp);
+    DisplayObject* p = parent();
+    if (p) {
+        getWorldMatrix(*p).transform(wp);
     }
 
     for (DisplayObjects::const_iterator i = _hitCharacters.begin(),
diff --git a/libcore/DisplayList.cpp b/libcore/DisplayList.cpp
index 0687c83..36d7979 100644
--- a/libcore/DisplayList.cpp
+++ b/libcore/DisplayList.cpp
@@ -443,7 +443,7 @@ DisplayList::swapDepths(DisplayObject* ch1, int newdepth)
         ch2->set_depth(srcdepth);
 
         // TODO: we're not actually invalidated ourselves, rather 
-        // our parent is...
+        // our p is...
         ch2->set_invalidated();
 
         // We won't accept static transforms after a depth swap.
@@ -466,7 +466,7 @@ DisplayList::swapDepths(DisplayObject* ch1, int newdepth)
     // we'll need it to assign to the new DisplayObject
     ch1->set_depth(newdepth);
 
-    // TODO: we're not actually invalidated ourselves, rather our parent is...
+    // TODO: we're not actually invalidated ourselves, rather our p is...
     //             UdoG ? Want to verify this ?
     ch1->set_invalidated();
 
@@ -654,12 +654,12 @@ DisplayList::display(Renderer& renderer, const Transform& 
base)
         // Characters acting as masks should always be rendered to the
         // mask buffer despite their visibility.
         //
-        DisplayObject* parent = ch->get_parent();
+        DisplayObject* p = ch->parent();
         bool renderAsMask = ch->isMaskLayer();
 
-        while (!renderAsMask && parent) {
-            renderAsMask = parent->isMaskLayer();
-            parent = parent->get_parent();
+        while (!renderAsMask && p) {
+            renderAsMask = p->isMaskLayer();
+            p = p->parent();
         }
         
         // check for non-mask hiden DisplayObjects
diff --git a/libcore/DisplayObject.cpp b/libcore/DisplayObject.cpp
index 610cd69..4c7837a 100644
--- a/libcore/DisplayObject.cpp
+++ b/libcore/DisplayObject.cpp
@@ -148,18 +148,6 @@ DisplayObject::getNextUnnamedInstanceName()
 }
 
 
-SWFMatrix
-DisplayObject::getWorldMatrix(bool includeRoot) const
-{
-       SWFMatrix m;
-       if (_parent) {
-           m = _parent->getWorldMatrix(includeRoot);
-       }
-    if (_parent || includeRoot) m.concatenate(getMatrix(*this));
-
-       return m;
-}
-
 int
 DisplayObject::getWorldVolume() const
 {
@@ -172,19 +160,6 @@ DisplayObject::getWorldVolume() const
        return volume;
 }
 
-SWFCxForm
-DisplayObject::getWorldCxForm() const
-{
-       SWFCxForm       m;
-       if (_parent != NULL)
-       {
-           m = _parent->getWorldCxForm();
-       }
-       m.concatenate(getCxForm(*this));
-
-       return m;
-}
-
 
 as_object*
 DisplayObject::pathElement(string_table::key key)
@@ -193,7 +168,7 @@ DisplayObject::pathElement(string_table::key key)
     if (!obj) return 0;
 
     string_table& st = stage().getVM().getStringTable();
-    if (key == st.find("..")) return getObject(get_parent());
+    if (key == st.find("..")) return getObject(parent());
        if (key == st.find(".")) return obj;
     
     // The check is case-insensitive for SWF6 and below.
@@ -254,7 +229,7 @@ DisplayObject::add_invalidated_bounds(InvalidatedRanges& 
ranges, bool force)
     if (visible() && (_invalidated||force))
     {
         SWFRect bounds;        
-        bounds.expand_to_transformed_rect(getWorldMatrix(), getBounds());
+        bounds.expand_to_transformed_rect(getWorldMatrix(*this), getBounds());
         ranges.add(bounds.getRange());                        
     }        
 }
@@ -633,7 +608,7 @@ DisplayObject::getTargetPath() const
     string_table& st = getStringTable(*getObject(this));
        for (;;)
        {
-               const DisplayObject* parent = ch->get_parent();
+               const DisplayObject* parent = ch->parent();
 
                // Don't push the _root name on the stack
                if (!parent) {
@@ -686,7 +661,7 @@ DisplayObject::getTarget() const
     string_table& st = stage().getVM().getStringTable();
        for (;;)
        {
-               const DisplayObject* parent = ch->get_parent();
+               const DisplayObject* parent = ch->parent();
 
                // Don't push the _root name on the stack
                if (!parent) {
@@ -838,10 +813,10 @@ DisplayObject::setMaskee(DisplayObject* maskee)
 bool 
 DisplayObject::boundsInClippingArea(Renderer& renderer) const 
 {
-  SWFRect mybounds = getBounds();
-  getWorldMatrix().transform(mybounds);
+    SWFRect mybounds = getBounds();
+    getWorldMatrix(*this).transform(mybounds);
   
-  return renderer.bounds_in_clipping_area(mybounds.getRange());  
+    return renderer.bounds_in_clipping_area(mybounds.getRange());  
 }
 
 #ifdef USE_SWFTREE
@@ -1020,9 +995,9 @@ DisplayObject::MaskRenderer::MaskRenderer(Renderer& r, 
const DisplayObject& o)
     if (!_mask) return;
 
     _renderer.begin_submit_mask();
-    DisplayObject* p = _mask->get_parent();
+    DisplayObject* p = _mask->parent();
     const Transform tr = p ?
-        Transform(p->getWorldMatrix(), p->getWorldCxForm()) : Transform(); 
+        Transform(getWorldMatrix(*p), getWorldCxForm(*p)) : Transform(); 
     _mask->display(_renderer, tr);
     _renderer.end_submit_mask();
 }
@@ -1031,6 +1006,24 @@ DisplayObject::MaskRenderer::~MaskRenderer()
 {
     if (_mask) _renderer.disable_mask();
 }
+
+SWFMatrix
+getWorldMatrix(const DisplayObject& d, bool includeRoot)
+{
+       SWFMatrix m = d.parent() ?
+        getWorldMatrix(*d.parent(), includeRoot) : SWFMatrix();
+
+    if (d.parent() || includeRoot) m.concatenate(getMatrix(d));
+       return m;
+}
+
+SWFCxForm
+getWorldCxForm(const DisplayObject& d) 
+{
+       SWFCxForm cx = d.parent() ? getWorldCxForm(*d.parent()) : SWFCxForm();
+       cx.concatenate(getCxForm(d));
+       return cx;
+}
         
 namespace {
 
@@ -1326,7 +1319,7 @@ getMouseX(DisplayObject& o)
        boost::int32_t x, y;
        getRoot(*getObject(&o)).get_mouse_state(x, y);
 
-       SWFMatrix m = o.getWorldMatrix();
+       SWFMatrix m = getWorldMatrix(o);
     point a(pixelsToTwips(x), pixelsToTwips(y));
     
     m.invert().transform(a);
@@ -1340,7 +1333,7 @@ getMouseY(DisplayObject& o)
        boost::int32_t x, y;
        getRoot(*getObject(&o)).get_mouse_state(x, y);
 
-       SWFMatrix m = o.getWorldMatrix();
+       SWFMatrix m = getWorldMatrix(o);
     point a(pixelsToTwips(x), pixelsToTwips(y));
     m.invert().transform(a);
     return as_value(twipsToPixels(a.y));
@@ -1377,7 +1370,7 @@ setRotation(DisplayObject& o, const as_value& val)
 as_value
 getParent(DisplayObject& o)
 {
-    as_object* p = getObject(o.get_parent());
+    as_object* p = getObject(o.parent());
     return p ? p : as_value();
 }
 
diff --git a/libcore/DisplayObject.h b/libcore/DisplayObject.h
index d066c94..3b246f5 100644
--- a/libcore/DisplayObject.h
+++ b/libcore/DisplayObject.h
@@ -118,6 +118,22 @@ void setIndexedProperty(size_t index, DisplayObject& o, 
const as_value& val);
 /// @param to       The DisplayObject to copy to.
 void copyMatrix(const DisplayObject& from, DisplayObject& to);
 
+/// Get concatenated SWFMatrix (all ancestor transforms and our SWFMatrix)
+//
+/// Maps from our local space into "world" space
+/// (i.e. root movie space).
+//
+/// @param includeRoot      Whether the transform of the Stage (_root)
+///                         should be concatenated. This is required to be
+///                         false for pointInBounds.
+DSOEXPORT SWFMatrix getWorldMatrix(const DisplayObject& d,
+        bool includeRoot = true);
+
+/// Get concatenated color transform of a DisplayObject
+//
+/// Maps from our local space into normal color space.
+SWFCxForm getWorldCxForm(const DisplayObject& d);
+
 /// DisplayObject is the base class for all DisplayList objects.
 //
 /// It represents a single active element in a movie. This class does not
@@ -233,7 +249,7 @@ public:
     /// \brief
     /// Return the parent of this DisplayObject, or NULL if
     /// the DisplayObject has no parent.
-    DisplayObject* get_parent() const
+    DisplayObject* parent() const
     {
         return _parent;
     }
@@ -415,25 +431,6 @@ public:
 
     string_table::key get_name() const { return _name; }
 
-    /// \brief
-    /// Get our concatenated SWFMatrix (all our ancestor transforms,
-    /// times our SWFMatrix). 
-    ///
-    /// Maps from our local space into "world" space
-    /// (i.e. root movie space).
-    //
-    /// @param includeRoot      Whether the transform of the Stage (_root)
-    ///                         should be concatenated. This is required to be
-    ///                         false for pointInBounds.
-    DSOEXPORT SWFMatrix getWorldMatrix(bool includeRoot = true) const;
-
-    /// \brief
-    /// Get our concatenated color transform (all our ancestor transforms,
-    /// times our SWFCxForm). 
-    ///
-    /// Maps from our local space into normal color space.
-    SWFCxForm getWorldCxForm() const;
-
     /// Get the built-in function handlers code for the given event
     //
     /// NOTE: this function is only for getting statically-defined
@@ -491,7 +488,7 @@ public:
     bool pointInBounds(boost::int32_t x, boost::int32_t y) const
     {
         SWFRect bounds = getBounds();
-        SWFMatrix wm = getWorldMatrix(false);
+        const SWFMatrix wm = getWorldMatrix(*this, false);
         wm.transform(bounds);
         return bounds.point_test(x, y);
     }
@@ -532,7 +529,7 @@ public:
     /// against this DisplayObject's parent.
     ///
     virtual Movie* get_root() const {
-        return get_parent()->get_root();
+        return parent()->get_root();
     }
 
     /// Return the _root ActionScript property of this DisplayObject.
diff --git a/libcore/DisplayObjectContainer.cpp 
b/libcore/DisplayObjectContainer.cpp
index 6128d6e..6b58bbe 100644
--- a/libcore/DisplayObjectContainer.cpp
+++ b/libcore/DisplayObjectContainer.cpp
@@ -56,7 +56,7 @@ DisplayObjectContainer::addChild(DisplayObject* obj)
 {
     // TODO: parent should be a DisplayObjectContainer; remove dynamic_cast.
     DisplayObjectContainer* parent =
-        dynamic_cast<DisplayObjectContainer*>(obj->get_parent());
+        dynamic_cast<DisplayObjectContainer*>(obj->parent());
     if (parent) parent->removeChild(obj);
 
     _displayList.addDisplayObject(obj);
@@ -70,7 +70,7 @@ DisplayObjectContainer::addChildAt(DisplayObject* obj, int 
index)
 {
     // TODO: parent should be a DisplayObjectContainer; remove dynamic_cast.
     DisplayObjectContainer* parent =
-        dynamic_cast<DisplayObjectContainer*>(obj->get_parent());
+        dynamic_cast<DisplayObjectContainer*>(obj->parent());
     if (parent) parent->removeChild(obj);
     
     _displayList.insertDisplayObject(obj, index);
diff --git a/libcore/Function2.cpp b/libcore/Function2.cpp
index ca242d2..b11476e 100644
--- a/libcore/Function2.cpp
+++ b/libcore/Function2.cpp
@@ -169,8 +169,8 @@ Function2::call(const fn_call& fn)
     if (_function2Flags & PRELOAD_PARENT) {
         DisplayObject* tgtch = _env.get_target();
         if (tgtch) {
-            as_object* parent = getObject(tgtch->get_parent());
-            cf.setLocalRegister(current_reg, parent);
+            as_object* p = getObject(tgtch->parent());
+            cf.setLocalRegister(current_reg, p);
             ++current_reg;
         }
     }
diff --git a/libcore/MorphShape.cpp b/libcore/MorphShape.cpp
index 99b8eee..c0a0113 100644
--- a/libcore/MorphShape.cpp
+++ b/libcore/MorphShape.cpp
@@ -39,10 +39,9 @@ MorphShape::MorphShape(movie_root& mr, as_object* object,
 bool
 MorphShape::pointInShape(boost::int32_t x, boost::int32_t y) const
 {
-    SWFMatrix wm = getWorldMatrix();
-    SWFMatrix wm_inverse = wm.invert();
+    const SWFMatrix wm = getWorldMatrix(*this).invert();
     point lp(x, y);
-    wm_inverse.transform(lp);
+    wm.transform(lp);
     
     // FIXME: if the shape contains non-scaled strokes
     //        we can't rely on boundary itself for a quick
diff --git a/libcore/MovieClip.cpp b/libcore/MovieClip.cpp
index 35827e0..7984bf9 100644
--- a/libcore/MovieClip.cpp
+++ b/libcore/MovieClip.cpp
@@ -538,7 +538,7 @@ MovieClip*
 MovieClip::duplicateMovieClip(const std::string& newname, int depth,
         as_object* initObject)
 {
-    DisplayObject* parent_ch = get_parent();
+    DisplayObject* parent_ch = parent();
     if (!parent_ch) {
         log_error(_("Can't clone root of the movie"));
         return NULL;
@@ -653,7 +653,7 @@ MovieClip::notifyEvent(const event_id& id)
         do
         {
             // we don't skip calling user-defined onLoad for top-level movies 
-            if ( ! get_parent() ) break;
+            if ( ! parent() ) break;
             // nor if there are clip-defined handler
             if ( ! get_event_handlers().empty() ) break; 
             // nor if it's dynamic  
@@ -1346,8 +1346,7 @@ MovieClip::pointInVisibleShape(boost::int32_t x, 
boost::int32_t y) const
 inline bool
 MovieClip::hitTestDrawable(boost::int32_t x, boost::int32_t y) const
 {
-    SWFMatrix wm = getWorldMatrix();
-    wm.invert();
+    const SWFMatrix wm = getWorldMatrix(*this).invert();
     point lp(x, y);
     wm.transform(lp);
     if (!_drawable.getBounds().point_test(lp.x, lp.y)) return false;
@@ -1378,15 +1377,14 @@ MovieClip::topmostMouseEntity(boost::int32_t x, 
boost::int32_t y)
 
     // point is in parent's space, we need to convert it in world space
     point wp(x, y);
-    DisplayObject* parent = get_parent();
-    if ( parent ) 
-    {
+    DisplayObject* p = parent();
+    if (p) {
         // WARNING: if we have NO parent, our parent is the Stage (movie_root)
         //          so, in case we'll add a "stage" matrix, we'll need to take
         //          it into account here.
         // TODO: actually, why are we insisting in using parent's
         //          coordinates for this method at all ?
-        parent->getWorldMatrix().transform(wp);
+        getWorldMatrix(*p).transform(wp);
     }
 
     if (mouseEnabled())
@@ -1396,8 +1394,9 @@ MovieClip::topmostMouseEntity(boost::int32_t x, 
boost::int32_t y)
     }
 
     SWFMatrix m = getMatrix(*this);
+    m.invert();
     point pp(x, y);
-    m.invert().transform(pp);
+    m.transform(pp);
 
     MouseEntityFinder finder(wp, pp);
     _displayList.visitAll(finder);
@@ -1689,7 +1688,9 @@ MovieClip::add_invalidated_bounds(InvalidatedRanges& 
ranges, bool force)
 
     /// Add drawable.
     SWFRect bounds;
-    bounds.expand_to_transformed_rect(getWorldMatrix(), _drawable.getBounds());
+    bounds.expand_to_transformed_rect(getWorldMatrix(*this),
+            _drawable.getBounds());
+
     ranges.add(bounds.getRange());
 
 }
@@ -1703,7 +1704,7 @@ MovieClip::constructAsScriptObject()
     // A MovieClip should always have an associated object.
     assert(mc);
 
-    if (!get_parent()) {
+    if (!parent()) {
         mc->init_member("$version", getVM(*mc).getPlayerVersion(), 0); 
     }
 
@@ -1764,7 +1765,7 @@ MovieClip::construct(as_object* initObj)
     // See misc-ming.all/action_execution_order_test4.{c,swf}
     //
     assert(!_callingFrameActions); // or will not be queuing actions
-    if (!get_parent()) {
+    if (!parent()) {
         executeFrameTags(0, _displayList, SWF::ControlTag::TAG_DLIST |
                 SWF::ControlTag::TAG_ACTION);
         if (getSWFVersion(*getObject(this)) > 5) {
@@ -1846,10 +1847,9 @@ MovieClip::unloadChildren()
 void
 MovieClip::getLoadedMovie(Movie* extern_movie)
 {
-    DisplayObject* parent = get_parent();
-    if (parent)
-    {
-        extern_movie->set_parent(parent);
+    DisplayObject* p = parent();
+    if (p) {
+        extern_movie->set_parent(p);
 
         // Copy own lockroot value
         extern_movie->setLockRoot(getLockRoot());
@@ -1874,7 +1874,7 @@ MovieClip::getLoadedMovie(Movie* extern_movie)
         //       could as well be a button I guess...
         //       At most we should require it to be a
         //       DisplayObjectContainer and log an error if it's not.
-        MovieClip* parent_sp = parent->to_movie();
+        MovieClip* parent_sp = p->to_movie();
         assert(parent_sp);
         parent_sp->_displayList.replaceDisplayObject(extern_movie, get_depth(),
                 true, true);
@@ -1994,15 +1994,13 @@ MovieClip::removeMovieClip()
         return;
     }
 
-    MovieClip* parent = dynamic_cast<MovieClip*>(get_parent());
-    if (parent)
-    {
+    MovieClip* p = dynamic_cast<MovieClip*>(parent());
+    if (p) {
         // second argument is arbitrary, see comments above
         // the function declaration in MovieClip.h
-        parent->remove_display_object(depth, 0);
+        p->remove_display_object(depth, 0);
     }
-    else
-    {
+    else {
         // removing _level#
         stage().dropLevel(depth);
         // I guess this can only happen if someone uses 
@@ -2139,8 +2137,8 @@ MovieClip::getAsRoot()
     //                then recursion.
     //                
 
-    DisplayObject* parent = get_parent();
-    if ( ! parent ) return this; // no parent, we're the root
+    DisplayObject* p = parent();
+    if (!p) return this; // no parent, we're the root
 
     // If we have a parent, we descend to it unless 
     // our _lockroot is true AND our or the VM's
@@ -2151,7 +2149,7 @@ MovieClip::getAsRoot()
         if (getLockRoot()) return this;
     }
 
-    return parent->getAsRoot();
+    return p->getAsRoot();
 }
 
 
diff --git a/libcore/Shape.cpp b/libcore/Shape.cpp
index 4df2af0..1c4f933 100644
--- a/libcore/Shape.cpp
+++ b/libcore/Shape.cpp
@@ -28,7 +28,7 @@ namespace gnash
 bool
 Shape::pointInShape(boost::int32_t x, boost::int32_t y) const
 {
-    SWFMatrix wm = getWorldMatrix();
+    SWFMatrix wm = getWorldMatrix(*this);
     wm.invert();
     point lp(x, y);
     wm.transform(lp);
diff --git a/libcore/TextField.cpp b/libcore/TextField.cpp
index 242c040..1712574 100644
--- a/libcore/TextField.cpp
+++ b/libcore/TextField.cpp
@@ -226,15 +226,14 @@ TextField::removeTextField()
         return;
     }
 
-    DisplayObject* parent = get_parent();
-    assert(parent); // every TextField must have a parent, right ?
+    DisplayObject* p = parent();
+    assert(p); // every TextField must have a parent, right ?
 
-    MovieClip* parentSprite = parent->to_movie();
+    MovieClip* parentSprite = p->to_movie();
 
-    if (!parentSprite)
-    {
+    if (!parentSprite) {
         log_error("FIXME: attempt to remove a TextField being a child of a %s",
-                typeName(*parent));
+                typeName(*p));
         return;
     }
 
@@ -386,7 +385,7 @@ TextField::add_invalidated_bounds(InvalidatedRanges& 
ranges, bool force)
     
     ranges.add(m_old_invalidated_ranges);
 
-    const SWFMatrix& wm = getWorldMatrix();
+    const SWFMatrix& wm = getWorldMatrix(*this);
 
     SWFRect bounds = getBounds();
     bounds.expand_to_rect(m_text_bounding_box); 
@@ -2280,9 +2279,9 @@ TextField::set_variable_name(const std::string& newname)
 bool
 TextField::pointInShape(boost::int32_t x, boost::int32_t y) const
 {
-    SWFMatrix wm = getWorldMatrix();
+    const SWFMatrix wm = getWorldMatrix(*this).invert();
     point lp(x, y);
-    wm.invert().transform(lp);
+    wm.transform(lp);
     return _bounds.point_test(lp.x, lp.y);
 }
 
diff --git a/libcore/Video.cpp b/libcore/Video.cpp
index 6ccde8c..f2ad888 100644
--- a/libcore/Video.cpp
+++ b/libcore/Video.cpp
@@ -248,7 +248,7 @@ Video::add_invalidated_bounds(InvalidatedRanges& ranges, 
bool force)
        assert (m_def);
 
        SWFRect bounds; 
-       bounds.expand_to_transformed_rect(getWorldMatrix(), m_def->bounds());
+       bounds.expand_to_transformed_rect(getWorldMatrix(*this), 
m_def->bounds());
        
        ranges.add(bounds.getRange());            
 }
diff --git a/libcore/asobj/MovieClip_as.cpp b/libcore/asobj/MovieClip_as.cpp
index 17db85e..b0aec02 100644
--- a/libcore/asobj/MovieClip_as.cpp
+++ b/libcore/asobj/MovieClip_as.cpp
@@ -601,7 +601,7 @@ movieclip_swapDepths(const fn_call& fn)
         return as_value();
     }
 
-    MovieClip* this_parent = dynamic_cast<MovieClip*>(movieclip->get_parent());
+    MovieClip* this_parent = dynamic_cast<MovieClip*>(movieclip->parent());
 
     //CharPtr target = NULL;
     int target_depth = 0;
@@ -619,7 +619,7 @@ movieclip_swapDepths(const fn_call& fn)
         }
 
         MovieClip* target_parent =
-            dynamic_cast<MovieClip*>(movieclip->get_parent());
+            dynamic_cast<MovieClip*>(movieclip->parent());
 
         if (this_parent != target_parent) {
             IF_VERBOSE_ASCODING_ERRORS(
@@ -999,11 +999,11 @@ movieclip_hitTest(const fn_call& fn)
             }
 
             SWFRect thisbounds = movieclip->getBounds();
-            SWFMatrix thismat = movieclip->getWorldMatrix();
+            const SWFMatrix thismat = getWorldMatrix(*movieclip);
             thismat.transform(thisbounds);
 
             SWFRect tgtbounds = target->getBounds();
-            SWFMatrix tgtmat = target->getWorldMatrix();
+            SWFMatrix tgtmat = getWorldMatrix(*target);
             tgtmat.transform(tgtbounds);
 
             return thisbounds.getRange().intersects(tgtbounds.getRange());
@@ -1230,11 +1230,11 @@ movieclip_getBounds(const fn_call& fn)
             return as_value();
         }
 
-        SWFMatrix tgtwmat = target->getWorldMatrix();
-        SWFMatrix srcwmat = movieclip->getWorldMatrix();
+        const SWFMatrix tgtwmat = getWorldMatrix(*target);
+        const SWFMatrix srcwmat = getWorldMatrix(*movieclip).invert();
 
         srcwmat.transform(bounds);
-        tgtwmat.invert().transform(bounds);
+        tgtwmat.transform(bounds);
     }
 
     double xMin, yMin, xMax, yMax;
@@ -1314,8 +1314,8 @@ movieclip_globalToLocal(const fn_call& fn)
     y = pixelsToTwips(tmp.to_number());
 
     point    pt(x, y);
-    SWFMatrix world_mat = movieclip->getWorldMatrix();
-    world_mat.invert().transform(pt);
+    const SWFMatrix world_mat = getWorldMatrix(*movieclip).invert();
+    world_mat.transform(pt);
 
     obj->set_member(NSV::PROP_X, twipsToPixels(pt.x));
     obj->set_member(NSV::PROP_Y, twipsToPixels(pt.y));
@@ -1375,8 +1375,8 @@ movieclip_localToGlobal(const fn_call& fn)
     }
     y = pixelsToTwips(tmp.to_number());
 
-    point    pt(x, y);
-    SWFMatrix world_mat = movieclip->getWorldMatrix();
+    point pt(x, y);
+    const SWFMatrix world_mat = getWorldMatrix(*movieclip);
     world_mat.transform(pt);
 
     obj->set_member(NSV::PROP_X, twipsToPixels(pt.x));
diff --git a/libcore/asobj/flash/geom/Transform_as.cpp 
b/libcore/asobj/flash/geom/Transform_as.cpp
index ab3de9b..a48edce 100644
--- a/libcore/asobj/flash/geom/Transform_as.cpp
+++ b/libcore/asobj/flash/geom/Transform_as.cpp
@@ -64,7 +64,7 @@ public:
     {}
 
     SWFMatrix worldMatrix() const {
-        return _movieClip.getWorldMatrix();
+        return getWorldMatrix(_movieClip);
     }
     
     const SWFMatrix& matrix() const {
@@ -76,7 +76,7 @@ public:
     }
 
     SWFCxForm worldColorTransform() const {
-        return _movieClip.getWorldCxForm();
+        return getWorldCxForm(_movieClip);
     }
 
     void setMatrix(const SWFMatrix& mat) { _movieClip.setMatrix(mat); }
diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index f5d5b50..5dd139d 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -767,7 +767,7 @@ movie_root::set_drag_state(const drag_state& st)
     {
         // Get coordinates of the DisplayObject's origin
         point origin(0, 0);
-        SWFMatrix chmat = ch->getWorldMatrix();
+        SWFMatrix chmat = getWorldMatrix(*ch);
         point world_origin;
         chmat.transform(&world_origin, origin);
 
@@ -797,11 +797,10 @@ movie_root::doMouseDrag()
 
     point world_mouse(pixelsToTwips(_mouseX), pixelsToTwips(_mouseY));
 
-    SWFMatrix    parent_world_mat;
-    DisplayObject* parent = dragChar->get_parent();
-    if (parent != NULL)
-    {
-        parent_world_mat = parent->getWorldMatrix();
+    SWFMatrix parent_world_mat;
+    DisplayObject* p = dragChar->parent();
+    if (p) {
+        parent_world_mat = getWorldMatrix(*p);
     }
 
     if (! m_drag_state.isLockCentered())
@@ -2575,7 +2574,7 @@ getNearestObject(const DisplayObject* o)
     while (1) {
         assert(o);
         if (isReferenceable(*o)) return o;
-        o = o->get_parent();
+        o = o->parent();
     }
 }
 

-----------------------------------------------------------------------

Summary of changes:
 README_bzr                                         |   57 --------------------
 libcore/Bitmap.cpp                                 |    2 +-
 libcore/Button.cpp                                 |    9 ++--
 libcore/DisplayList.cpp                            |    8 ++--
 libcore/DisplayObject.cpp                          |   51 +++++-------------
 libcore/DisplayObject.h                            |   57 ++++++++++++--------
 libcore/DisplayObjectContainer.cpp                 |    4 +-
 libcore/Function2.cpp                              |    4 +-
 libcore/MorphShape.cpp                             |    5 +-
 libcore/MovieClip.cpp                              |   50 ++++++++---------
 libcore/Shape.cpp                                  |    2 +-
 libcore/TextField.cpp                              |   17 +++---
 libcore/Video.cpp                                  |    2 +-
 libcore/asobj/MovieClip_as.cpp                     |   22 ++++----
 libcore/asobj/flash/geom/Transform_as.cpp          |    4 +-
 libcore/movie_root.cpp                             |   13 ++---
 .../movies.all/gravity_embedded-TestRunner.cpp     |    2 +-
 17 files changed, 117 insertions(+), 192 deletions(-)
 delete mode 100644 README_bzr


hooks/post-receive
-- 
Gnash



reply via email to

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