[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9665: Reintroduce MIT_SHM for agg (
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9665: Reintroduce MIT_SHM for agg (was forced off); testsuite (matrix) cleanups; remoting cleanups |
Date: |
Wed, 03 Sep 2008 14:15:06 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9665
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2008-09-03 14:15:06 +0200
message:
Reintroduce MIT_SHM for agg (was forced off); testsuite (matrix) cleanups;
remoting cleanups
modified:
gui/gtk_glue_agg.h
libcore/asobj/NetConnection.cpp
testsuite/libcore.all/MatrixTest.cpp
testsuite/misc-ming.all/matrix_test.c
------------------------------------------------------------
revno: 9662.1.1
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Wed 2008-09-03 13:25:57 +0200
message:
Fix leak of SimpleBuffers while encoding remoting call.
Properly log unimplemented for unsupported as_value types.
modified:
libcore/asobj/NetConnection.cpp
------------------------------------------------------------
revno: 9662.1.2
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Wed 2008-09-03 13:42:35 +0200
message:
Add another test, only round values when needed
modified:
testsuite/misc-ming.all/matrix_test.c
------------------------------------------------------------
revno: 9662.1.3
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Wed 2008-09-03 13:47:05 +0200
message:
don't force ENABLE_MIT_SHM off, should be done at configure time
modified:
gui/gtk_glue_agg.h
------------------------------------------------------------
revno: 9662.1.4
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Wed 2008-09-03 14:09:44 +0200
message:
Take curernt gnash results as correct: no evidence of bugs about it.
modified:
testsuite/libcore.all/MatrixTest.cpp
=== modified file 'gui/gtk_glue_agg.h'
--- a/gui/gtk_glue_agg.h 2008-07-23 08:16:16 +0000
+++ b/gui/gtk_glue_agg.h 2008-09-03 11:47:05 +0000
@@ -26,8 +26,6 @@
#include <gdk/gdk.h>
#include <boost/scoped_array.hpp>
-#undef ENABLE_MIT_SHM
-
// Experimental support for MIT-SHM
// see http://www.xfree86.org/current/mit-shm.html
// currently has some problems, see https://savannah.gnu.org/bugs/?20301
=== modified file 'libcore/asobj/NetConnection.cpp'
--- a/libcore/asobj/NetConnection.cpp 2008-09-02 22:57:53 +0000
+++ b/libcore/asobj/NetConnection.cpp 2008-09-03 11:25:57 +0000
@@ -582,7 +582,7 @@
}
}
- SimpleBuffer *buf = new SimpleBuffer(32);
+ boost::scoped_ptr<SimpleBuffer> buf ( new SimpleBuffer(32) );
std::string methodName = methodName_as.to_string();
@@ -613,9 +613,11 @@
buf->appendNetworkLong(fn.nargs - 2);
if (fn.nargs > 2) {
- for (unsigned int i = 2; i < fn.nargs; ++i) {
+ for (unsigned int i = 2; i < fn.nargs; ++i)
+ {
+ const as_value& arg = fn.arg(i);
- if (fn.arg(i).is_string()) {
+ if (arg.is_string()) {
buf->appendByte(amf::Element::STRING_AMF0);
std::string str = fn.arg(i).to_string();
buf->appendNetworkShort(str.size());
@@ -626,7 +628,8 @@
// tmp = AMF::encodefunction(f);
}
- else if(fn.arg(i).is_number()) {
+ else if(arg.is_number())
+ {
double d = fn.arg(i).to_number();
buf->appendByte(amf::Element::NUMBER_AMF0);
amf::swapBytes(&d, 8); // this actually only
swapps on little-endian machines
@@ -637,8 +640,9 @@
// tmp = AMF::encodeObject(o);
}
- else {
- log_error(_("NetConnection.call(): unknown
argument type"));
+ else
+ {
+ log_unimpl(_("NetConnection.call(): unsupported
argument type %s"), arg);
buf->appendByte(amf::Element::UNDEFINED_AMF0);
}
}
=== modified file 'testsuite/libcore.all/MatrixTest.cpp'
--- a/testsuite/libcore.all/MatrixTest.cpp 2008-08-18 23:53:04 +0000
+++ b/testsuite/libcore.all/MatrixTest.cpp 2008-09-03 12:09:44 +0000
@@ -160,22 +160,22 @@
check_equals(D(m2.get_y_scale()), 1);
check_equals(D(m2.get_rotation()), 0);
m2.set_x_scale(-16);
- check_equals(D(m2.get_x_scale()), -16);
+ check_equals(D(m2.get_x_scale()), 16);
check_equals(D(m2.get_y_scale()), 1);
- check_equals(D(m2.get_rotation()), 0);
+ check_equals(D(m2.get_rotation()), 3.14159);
m2.set_x_scale(16);
check_equals(D(m2.get_x_scale()), 16);
check_equals(D(m2.get_y_scale()), 1);
- check_equals(D(m2.get_rotation()), 0);
+ check_equals(D(m2.get_rotation()), 3.14159);
m2.set_x_scale(16);
m2.set_y_scale(-64);
check_equals(D(m2.get_x_scale()), 16);
- check_equals(D(m2.get_y_scale()), -64);
- check_equals(D(m2.get_rotation()), 0);
+ check_equals(D(m2.get_y_scale()), 64);
+ check_equals(D(m2.get_rotation()), 3.14159);
m2.set_x_scale(16);
m2.set_x_scale(-128);
- check_equals(D(m2.get_x_scale()), -128);
- check_equals(D(m2.get_y_scale()), -64);
+ check_equals(D(m2.get_x_scale()), 128);
+ check_equals(D(m2.get_y_scale()), 64);
check_equals(D(m2.get_rotation()), 0);
//
=== modified file 'testsuite/misc-ming.all/matrix_test.c'
--- a/testsuite/misc-ming.all/matrix_test.c 2008-08-26 12:26:38 +0000
+++ b/testsuite/misc-ming.all/matrix_test.c 2008-09-03 11:42:35 +0000
@@ -116,7 +116,7 @@
check_equals(mo, "staticmc._y", "300");
check_equals(mo, "Math.round(staticmc._xscale)", "100");
check_equals(mo, "Math.round(staticmc._yscale)", "100");
- check_equals(mo, "Math.round(staticmc._rotation*100)", "4500");
+ check_equals(mo, "staticmc._rotation", "45");
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'7.5,257.5
92.5,342.5'");
check_equals(mo, "staticmc._width", "85");
@@ -130,7 +130,7 @@
check_equals(mo, "staticmc._y", "300");
check_equals(mo, "Math.round(staticmc._xscale)", "200");
check_equals(mo, "Math.round(staticmc._yscale)", "300");
- check_equals(mo, "Math.round(staticmc._rotation*100)", "4500");
+ check_equals(mo, "staticmc._rotation", "45");
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-56.25,193.75 156.25,406.25'");
check_equals(mo, "staticmc._width", "212.5");
@@ -144,7 +144,7 @@
check_equals(mo, "staticmc._y", "300");
check_equals(mo, "Math.round(staticmc._xscale)", "447");
check_equals(mo, "Math.round(staticmc._yscale)", "300");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "18435");
+ check_equals(mo, "Math.round(staticmc._rotation*1000)", "18435"); //
18.43469...
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-141.25,193.75 241.25,406.25'");
check_equals(mo, "staticmc._width", "382.5");
@@ -158,7 +158,7 @@
check_equals(mo, "staticmc._y", "300");
check_equals(mo, "Math.round(staticmc._xscale)", "447");
check_equals(mo, "Math.round(staticmc._yscale)", "300");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "18435");
+ check_equals(mo, "Math.round(staticmc._rotation*1000)", "18435"); //
18.43469...
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-141.25,193.75 241.25,406.25'");
check_equals(mo, "staticmc._width", "382.5");
@@ -172,7 +172,7 @@
check_equals(mo, "staticmc._y", "300");
check_equals(mo, "Math.round(staticmc._xscale)", "200");
check_equals(mo, "Math.round(staticmc._yscale)", "300");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "45000");
+ check_equals(mo, "staticmc._rotation", "45");
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-56.25,193.75 156.25,406.25'");
check_equals(mo, "staticmc._width", "212.5");
@@ -186,7 +186,7 @@
check_equals(mo, "staticmc._y", "300");
check_equals(mo, "Math.round(staticmc._xscale)", "200");
check_equals(mo, "Math.round(staticmc._yscale)", "200");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "-135000");
+ check_equals(mo, "staticmc._rotation", "-135");
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-35,215
135,385'");
check_equals(mo, "staticmc._width", "170");
@@ -199,9 +199,9 @@
check_equals(mo, "staticmc._x", "50");
check_equals(mo, "staticmc._y", "300");
- check_equals(mo, "Math.round(staticmc._xscale)", "100");
- check_equals(mo, "Math.round(staticmc._yscale)", "224");
- xcheck_equals(mo, "Math.round(staticmc._rotation*1000)", "135000"); //
gnash gives 135001
+ check_equals(mo, "Math.round(staticmc._xscale)", "100"); //
non-rounded value differs with Gnash
+ check_equals(mo, "Math.round(staticmc._yscale)", "224"); //
non-rounded value differs with Gnash
+ check_equals(mo, "Math.round(staticmc._rotation)", "135"); //
non-rounded value differs with Gnash
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-35,257.5
135,342.5'");
check_equals(mo, "staticmc._width", "170");
@@ -212,9 +212,9 @@
check_equals(mo, "staticmc._x", "50");
check_equals(mo, "staticmc._y", "300");
- check_equals(mo, "Math.round(staticmc._xscale)", "100");
- check_equals(mo, "Math.round(staticmc._yscale)", "100");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "0");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'19.95,269.95 80.05,330.05'");
check_equals(mo, "staticmc._width", "60.1");
@@ -225,9 +225,9 @@
check_equals(mo, "staticmc._x", "50");
check_equals(mo, "staticmc._y", "300");
- check_equals(mo, "Math.round(staticmc._xscale)", "100");
- check_equals(mo, "Math.round(staticmc._yscale)", "100");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "180000"); // x
scale -1 gets interpreted as a 180 degree rotation
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._rotation", "180"); // x scale -1 gets
interpreted as a 180 degree rotation
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'19.95,269.95 80.05,330.05'");
check_equals(mo, "staticmc._width", "60.1");
@@ -238,9 +238,22 @@
check_equals(mo, "staticmc._x", "50");
check_equals(mo, "staticmc._y", "300");
- check_equals(mo, "Math.round(staticmc._xscale)", "100");
- check_equals(mo, "Math.round(staticmc._yscale)", "100");
- check_equals(mo, "Math.round(staticmc._rotation*1000)", "0");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
+ check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'19.95,269.95 80.05,330.05'");
+ check_equals(mo, "staticmc._width", "60.1");
+ check_equals(mo, "staticmc._height", "60.1");
+
+ SWFMovie_nextFrame(mo);
+ SWFDisplayItem_setMatrix(it, -1, 0, 0, -1, 50, 300); // negative x and
y scales
+
+ check_equals(mo, "staticmc._x", "50");
+ check_equals(mo, "staticmc._y", "300");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._rotation", "180");
check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'19.95,269.95 80.05,330.05'");
check_equals(mo, "staticmc._width", "60.1");
@@ -253,7 +266,7 @@
SWFMovie_nextFrame(mo);
- add_actions(mo, "_root.totals(98); stop();");
+ add_actions(mo, "_root.totals(107); stop();");
SWFMovie_nextFrame(mo);
//Output movie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9665: Reintroduce MIT_SHM for agg (was forced off); testsuite (matrix) cleanups; remoting cleanups,
Sandro Santilli <=