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. 5f8ad987f08b41cb5c5e


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 5f8ad987f08b41cb5c5e5243394d08be806642cb
Date: Thu, 25 Nov 2010 10:39:24 +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  5f8ad987f08b41cb5c5e5243394d08be806642cb (commit)
       via  5d3fa3e6c3042fb8f0466b258213e83066199306 (commit)
       via  813fcbf546e29e9dd1fc2da817c0ab22749dc214 (commit)
       via  c911cdba00b9474df80803ef4aaf4dfec62f2bd7 (commit)
       via  e66bb88cfed5a6dcae6f822923170b73e6aade88 (commit)
      from  8a15dbc96e1786dae6b0e527e80c07a5b1724f9b (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=5f8ad987f08b41cb5c5e5243394d08be806642cb


commit 5f8ad987f08b41cb5c5e5243394d08be806642cb
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Nov 25 11:37:48 2010 +0100

    Fix silly spacing, use std::pow

diff --git a/libcore/DisplayObject.cpp b/libcore/DisplayObject.cpp
index 6e3513f..fcf9e46 100644
--- a/libcore/DisplayObject.cpp
+++ b/libcore/DisplayObject.cpp
@@ -397,7 +397,6 @@ DisplayObject::setMatrix(const SWFMatrix& m, bool 
updateCache)
 
     if (m == _transform.matrix) return;
 
-    //log_debug("setting SWFMatrix to: %s", m);
     set_invalidated(__FILE__, __LINE__);
     _transform.matrix = m;
 
diff --git a/libcore/SWFMatrix.cpp b/libcore/SWFMatrix.cpp
index 682c00f..61dc033 100644
--- a/libcore/SWFMatrix.cpp
+++ b/libcore/SWFMatrix.cpp
@@ -80,7 +80,7 @@ void
 SWFMatrix::transform(geometry::Point2d& p) const
 {
     boost::int32_t t0 = multiplyFixed16(_a, p.x) + multiplyFixed16(_c, p.y) + 
_tx;
-    boost::int32_t t1 = multiplyFixed16(_b,p.x) + multiplyFixed16(_d,  p.y) + 
_ty;
+    boost::int32_t t1 = multiplyFixed16(_b, p.x) + multiplyFixed16(_d, p.y) + 
_ty;
     p.x = t0;
     p.y = t1;
 }
@@ -129,12 +129,12 @@ void
 SWFMatrix::concatenate(const SWFMatrix& m)
 {
     SWFMatrix t;
-    t._a =  multiplyFixed16(_a, m._a)  + multiplyFixed16(_c, m._b);
+    t._a = multiplyFixed16(_a, m._a) + multiplyFixed16(_c, m._b);
     t._b = multiplyFixed16(_b, m._a) + multiplyFixed16(_d, m._b);
     t._c = multiplyFixed16(_a, m._c) + multiplyFixed16(_c, m._d);
-    t._d =  multiplyFixed16(_b, m._c)+ multiplyFixed16(_d, m._d);
-    t._tx =  multiplyFixed16(_a, m._tx)  + multiplyFixed16(_c, m._ty) + _tx;
-    t._ty =  multiplyFixed16(_b, m._tx) + multiplyFixed16(_d, m._ty)  + _ty;
+    t._d = multiplyFixed16(_b, m._c) + multiplyFixed16(_d, m._d);
+    t._tx = multiplyFixed16(_a, m._tx) + multiplyFixed16(_c, m._ty) + _tx;
+    t._ty = multiplyFixed16(_b, m._tx) + multiplyFixed16(_d, m._ty) + _ty;
 
     *this = t;
 }
@@ -145,7 +145,7 @@ SWFMatrix::concatenate(const SWFMatrix& m)
 void
 SWFMatrix::concatenate_translation(int xoffset, int yoffset)
 {
-    _tx += multiplyFixed16(_a,  xoffset) + multiplyFixed16(_c, yoffset);
+    _tx += multiplyFixed16(_a, xoffset) + multiplyFixed16(_c, yoffset);
     _ty += multiplyFixed16(_b, xoffset) + multiplyFixed16(_d, yoffset);
 }
 
@@ -154,10 +154,10 @@ SWFMatrix::concatenate_translation(int xoffset, int 
yoffset)
 void
 SWFMatrix::concatenate_scale(double xscale, double yscale)
 {
-    _a  = multiplyFixed16(_a, toFixed16(xscale));
-    _c = multiplyFixed16(_c,toFixed16(yscale));
-    _b = multiplyFixed16(_b,toFixed16(xscale));
-    _d  = multiplyFixed16(_d, toFixed16(yscale)); 
+    _a = multiplyFixed16(_a, toFixed16(xscale));
+    _c = multiplyFixed16(_c, toFixed16(yscale));
+    _b = multiplyFixed16(_b, toFixed16(xscale));
+    _d = multiplyFixed16(_d, toFixed16(yscale)); 
 }
 
 // Set this SWFMatrix to a blend of m1 and m2, parameterized by t.
@@ -179,10 +179,10 @@ SWFMatrix::set_scale_rotation(double x_scale, double 
y_scale, double angle)
 {
     const double cos_angle = std::cos(angle);
     const double sin_angle = std::sin(angle);
-    _a  = toFixed16(x_scale * cos_angle);
+    _a = toFixed16(x_scale * cos_angle);
     _c = toFixed16(y_scale * -sin_angle);
     _b = toFixed16(x_scale * sin_angle);
-    _d  = toFixed16(y_scale * cos_angle); 
+    _d = toFixed16(y_scale * cos_angle); 
 }
 
 void
@@ -274,12 +274,12 @@ SWFMatrix::invert()
     const double dn = 65536.0 * 65536.0 / det;
     
     const boost::int32_t t0 = (boost::int32_t)(d() * dn);
-    _d  = (boost::int32_t)(a() * dn);
+    _d = (boost::int32_t)(a() * dn);
     _c = (boost::int32_t)(-c() * dn);
     _b = (boost::int32_t)(-b() * dn);
 
-    const boost::int32_t t4 = - (multiplyFixed16(_tx, t0) + 
multiplyFixed16(_ty, _c));
-    _ty = - (multiplyFixed16(_tx, _b) + multiplyFixed16(_ty, _d));
+    const boost::int32_t t4 = -(multiplyFixed16(_tx, t0) + 
multiplyFixed16(_ty, _c));
+    _ty = -(multiplyFixed16(_tx, _b) + multiplyFixed16(_ty, _d));
 
     _a = t0;
     _tx = t4;
@@ -290,16 +290,16 @@ SWFMatrix::invert()
 double
 SWFMatrix::get_x_scale() const
 {
-    const double a2 = static_cast<double>(a()) * a();
-    const double b2 = static_cast<double>(b()) * b();
+    const double a2 = std::pow(a(), 2);
+    const double b2 = std::pow(b(), 2);
     return std::sqrt(a2 + b2) / 65536.0;
 }
 
 double
 SWFMatrix::get_y_scale() const
 {
-    const double d2 = static_cast<double>(d()) * d();
-    const double c2 = static_cast<double>(c()) * c();
+    const double d2 = std::pow(d(), 2);
+    const double c2 = std::pow(c(), 2);
     return std::sqrt(d2 + c2) / 65536.0;
 }
 

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


commit 5d3fa3e6c3042fb8f0466b258213e83066199306
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Nov 25 11:04:46 2010 +0100

    Only log error when requested, and drop misleading info.

diff --git a/libcore/as_object.cpp b/libcore/as_object.cpp
index 11904f3..6369549 100644
--- a/libcore/as_object.cpp
+++ b/libcore/as_object.cpp
@@ -632,9 +632,11 @@ as_object::set_member(const ObjectURI& uri, const 
as_value& val, bool ifFound)
         try {
             executeTriggers(prop, uri, val);
         }
-        catch (ActionTypeError& exc) {
-            log_aserror(_("%s: Exception %s. Will create a new member"),
-                        getStringTable(*this).value(getName(uri)), exc.what());
+        catch (const ActionTypeError& exc) {
+            IF_VERBOSE_ASCODING_ERRORS(
+                log_aserror(
+                _("%s: %s"), getStringTable(*this).value(getName(uri)), 
exc.what());
+            );
         }
             
         return true;

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


commit 813fcbf546e29e9dd1fc2da817c0ab22749dc214
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Nov 25 10:57:33 2010 +0100

    Convert error to aserror.

diff --git a/libcore/asobj/MovieClip_as.cpp b/libcore/asobj/MovieClip_as.cpp
index c16ff9f..ffc7a87 100644
--- a/libcore/asobj/MovieClip_as.cpp
+++ b/libcore/asobj/MovieClip_as.cpp
@@ -2092,7 +2092,9 @@ movieclip_transform(const fn_call& fn)
     boost::intrusive_ptr<as_function> transCtor = transform.to_function();
 
     if (!transCtor) {
-        log_error("Failed to construct flash.geom.Transform!");
+        IF_VERBOSE_ASCODING_ERRORS(
+            log_aserror("Failed to construct flash.geom.Transform!");
+        );
         return as_value();
     }
 

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


commit c911cdba00b9474df80803ef4aaf4dfec62f2bd7
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Nov 25 10:55:16 2010 +0100

    Convert error to a swferror.

diff --git a/libcore/vm/ASHandlers.cpp b/libcore/vm/ASHandlers.cpp
index c68eb08..637405d 100644
--- a/libcore/vm/ASHandlers.cpp
+++ b/libcore/vm/ASHandlers.cpp
@@ -1049,12 +1049,15 @@ ActionGetProperty(ActionExec& thread)
 
     as_value& tgt_val = env.top(1);
     std::string tgt_str = tgt_val.to_string();
-    DisplayObject *target = NULL;
+
+    DisplayObject* target;
     if (tgt_str.empty()) {
         target = get<DisplayObject>(thread.getTarget());
         if (!target) {
-            log_error(_("ActionGetProperty(<empty>) called, but current "
-                        "target is not a DisplayObject"));
+            IF_VERBOSE_MALFORMED_SWF(
+                log_swferror(_("ActionGetProperty(<empty>) called, but "
+                    "current target is not a DisplayObject"));
+            );
         }
     }
     else {

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


commit e66bb88cfed5a6dcae6f822923170b73e6aade88
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Nov 25 10:53:56 2010 +0100

    Don't log aserror if not wanted.

diff --git a/libcore/asobj/NetConnection_as.cpp 
b/libcore/asobj/NetConnection_as.cpp
index 7293d86..35ebc24 100644
--- a/libcore/asobj/NetConnection_as.cpp
+++ b/libcore/asobj/NetConnection_as.cpp
@@ -568,7 +568,9 @@ NetConnection_as::call(as_object* asCallback, const 
std::string& methodName,
         const std::vector<as_value>& args)
 {
     if (!_currentConnection.get()) {
-        log_aserror("NetConnection.call: can't call while not connected");
+        IF_VERBOSE_ASCODING_ERRORS(
+            log_aserror("NetConnection.call: can't call while not connected");
+        );
         return;
     }
 

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

Summary of changes:
 libcore/DisplayObject.cpp          |    1 -
 libcore/SWFMatrix.cpp              |   38 ++++++++++++++++++------------------
 libcore/as_object.cpp              |    8 ++++--
 libcore/asobj/MovieClip_as.cpp     |    4 ++-
 libcore/asobj/NetConnection_as.cpp |    4 ++-
 libcore/vm/ASHandlers.cpp          |    9 +++++--
 6 files changed, 36 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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