[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/as...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/as... |
Date: |
Wed, 23 Apr 2008 20:35:38 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/04/23 20:35:38
Modified files:
. : ChangeLog
server : movie_root.cpp
server/asobj : Stage.h
testsuite/actionscript.all: Stage.as
Log message:
* server/asobj/Stage.h: make notifyResize a public method.
* server/movie_root.cpp: only send onResize event when stage size
actually changes.
* testsuite/actionscript.all/Stage.as: don't expect a call to onResize
when just assigning to scaleMode, it is reported to be a bug in
the proprietary player for linux.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6372&r2=1.6373
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.186&r2=1.187
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Stage.h?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Stage.as?cvsroot=gnash&r1=1.29&r2=1.30
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6372
retrieving revision 1.6373
diff -u -b -r1.6372 -r1.6373
--- ChangeLog 23 Apr 2008 19:36:56 -0000 1.6372
+++ ChangeLog 23 Apr 2008 20:35:37 -0000 1.6373
@@ -1,5 +1,14 @@
2008-04-23 Sandro Santilli <address@hidden>
+ * server/asobj/Stage.h: make notifyResize a public method.
+ * server/movie_root.cpp: only send onResize event when stage size
+ actually changes.
+ * testsuite/actionscript.all/Stage.as: don't expect a call to onResize
+ when just assigning to scaleMode, it is reported to be a bug in
+ the proprietary player for linux.
+
+2008-04-23 Sandro Santilli <address@hidden>
+
* testsuite/misc-ming.all/: Makefile.am, StageConfigTest.as:
Committed the test grew and used the whole day for stage testing.
It shows we still get Stage size wrong, but is not automated yet.
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -b -r1.186 -r1.187
--- server/movie_root.cpp 23 Apr 2008 17:47:10 -0000 1.186
+++ server/movie_root.cpp 23 Apr 2008 20:35:37 -0000 1.187
@@ -155,10 +155,9 @@
m_viewport_x0 = 0;
m_viewport_y0 = 0;
- m_viewport_width = static_cast<int>(
- movie->get_movie_definition()->get_width_pixels());
- m_viewport_height = static_cast<int>(
- movie->get_movie_definition()->get_height_pixels());
+ movie_definition* md = movie->get_movie_definition();
+ m_viewport_width = static_cast<int>(md->get_width_pixels());
+ m_viewport_height = static_cast<int>(md->get_height_pixels());
// assert(movie->get_depth() == 0); ?
movie->set_depth(character::staticDepthOffset);
@@ -458,7 +457,7 @@
{
//log_debug("Rescaling disabled");
boost::intrusive_ptr<Stage> stage = getStageObject();
- if ( stage ) stage->onResize();
+ if ( stage ) stage->notifyResize();
}
assert(testInvariant());
@@ -1309,13 +1308,31 @@
{
if ( _scaleMode == sm ) return; // nothing to do
+ bool notifyResize = false;
+ if ( sm == noScale || _scaleMode == noScale )
+ {
+ // If we go from or to noScale, we notify a resize
+ // if and only if display viewport is != then actual
+ // movie size
+ movie_definition* md = _rootMovie->get_movie_definition();
+
+ log_debug("Going to or from scaleMode=noScale. Viewport:%dx%d
Def:%dx%d", m_viewport_width, m_viewport_height, md->get_width_pixels(),
md->get_height_pixels());
+
+ if ( m_viewport_width != md->get_width_pixels()
+ || m_viewport_height != md->get_height_pixels() )
+ {
+ notifyResize = true;
+ }
+ }
+
+
_scaleMode = sm;
if (interfaceHandle) (*interfaceHandle)("Stage.align", "");
- if ( _scaleMode == noScale )
+ if ( notifyResize )
{
boost::intrusive_ptr<Stage> stage = getStageObject();
- if ( stage ) stage->onResize();
+ if ( stage ) stage->notifyResize();
}
}
Index: server/asobj/Stage.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Stage.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/asobj/Stage.h 23 Apr 2008 16:35:54 -0000 1.18
+++ server/asobj/Stage.h 23 Apr 2008 20:35:37 -0000 1.19
@@ -53,6 +53,9 @@
/// Recive a resize event.
void onResize();
+ /// Notify all listeners about a resize event
+ void notifyResize();
+
/// Get current stage width, in pixels
unsigned getWidth() const;
@@ -87,9 +90,6 @@
private:
- /// Notify all listeners about a resize event
- void notifyResize();
-
std::string _alignMode;
DisplayState _displayState;
Index: testsuite/actionscript.all/Stage.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Stage.as,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- testsuite/actionscript.all/Stage.as 23 Apr 2008 17:47:11 -0000 1.29
+++ testsuite/actionscript.all/Stage.as 23 Apr 2008 20:35:37 -0000 1.30
@@ -21,7 +21,7 @@
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Stage.as,v 1.29 2008/04/23 17:47:11 strk Exp $";
+rcsid="$Id: Stage.as,v 1.30 2008/04/23 20:35:37 strk Exp $";
#include "check.as"
check_equals (typeof(Stage), 'object');
@@ -155,8 +155,11 @@
#if OUTPUT_VERSION > 5
- // an onResize event everytime scaleMode is set to "noScale" (from a
different value)
- check_totals(48);
+ // NOTE: proprietary player for linux is bogus here,
+ // in that it always sends an onResize event
+ // when scaleMode is set to "noScale" from something else
+ note("NOTE: Linux version of the proprieraty player is known to fail a test
(sending a bogus onResize event)");
+ check_totals(47);
#else
check_totals(32);
#endif