[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil... |
Date: |
Wed, 22 Aug 2007 05:55:09 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/08/22 05:55:09
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Makefile.am
Added files:
testsuite/misc-ming.all: masks_test2.c masks_test2runner.cpp
Log message:
new testcase for nested masks.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4063&r2=1.4064
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.147&r2=1.148
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/masks_test2.c?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/masks_test2runner.cpp?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4063
retrieving revision 1.4064
diff -u -b -r1.4063 -r1.4064
--- ChangeLog 22 Aug 2007 04:27:02 -0000 1.4063
+++ ChangeLog 22 Aug 2007 05:55:09 -0000 1.4064
@@ -1,3 +1,14 @@
+2007-08-22 Zou Lunkai <address@hidden>
+
+ * testsuite/misc-ming.all/masks_test2.c,
+ testsuite/misc-ming.all/masks_test2runner.cpp,
+ testsuite/misc-ming.all/Makefile.am: new testcase for nested masks.
+
+2007-08-22 Zou Lunkai <address@hidden>
+
+ * server/dlist.cpp, server/sprite_instance.cpp: handle hiden characters
+ as masks, passed UdoG's test files.
+
2007-08-22 Chad Musick <address@hidden>
* server/impl.cpp: Add tag loaders (default loaders)
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -b -r1.147 -r1.148
--- testsuite/misc-ming.all/Makefile.am 17 Aug 2007 18:02:36 -0000 1.147
+++ testsuite/misc-ming.all/Makefile.am 22 Aug 2007 05:55:09 -0000 1.148
@@ -101,6 +101,8 @@
displaylist_depths_test10 \
displaylist_depths_test11 \
masks_test \
+ masks_test2 \
+ masks_test2runner \
attachMovieTest \
attachMovieTestRunner \
attachMovieLoopingTest \
@@ -908,6 +910,29 @@
masks_test.swf \
$(NULL)
+
+masks_test2_SOURCES = \
+ masks_test2.c \
+ $(NULL)
+masks_test2_LDADD = libgnashmingutils.la
+
+masks_test2.swf: masks_test2
+ ./masks_test2 $(top_srcdir)/testsuite/media
+
+masks_test2runner_SOURCES = \
+ masks_test2runner.cpp \
+ $(NULL)
+masks_test2runner_CXXFLAGS = \
+ -DTGTDIR='"$(abs_builddir)"' \
+ $(NULL)
+masks_test2runner_LDADD = \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ $(NULL)
+masks_test2runner_DEPENDENCIES = \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ masks_test2.swf \
+ $(NULL)
+
matrix_test_SOURCES = \
matrix_test.c \
$(NULL)
@@ -1647,6 +1672,7 @@
duplicate_movie_clip_test2runner \
event_handler_scope_testrunner \
masks_testrunner \
+ masks_test2runner \
key_event_testrunner \
key_event_test2runner \
key_event_test3runner \
Index: testsuite/misc-ming.all/masks_test2.c
===================================================================
RCS file: testsuite/misc-ming.all/masks_test2.c
diff -N testsuite/misc-ming.all/masks_test2.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/masks_test2.c 22 Aug 2007 05:55:09 -0000
1.1
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/*
+ * Zou Lunkai, address@hidden
+ *
+ * Test for nested masks
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "masks_test2.swf"
+
+SWFMovieClip defineMovieclip(int x, int y, int w, int h);
+
+SWFMovieClip defineMovieclip(int x, int y, int w, int h)
+{
+ SWFMovieClip mc;
+ SWFShape sh;
+ mc = newSWFMovieClip();
+ sh = make_fill_square (x, y, w, h, 255, 0, 0, 255, 0, 0);
+ SWFMovieClip_add(mc, (SWFBlock)sh);
+ SWFMovieClip_nextFrame(mc);
+ return mc;
+}
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+ SWFMovieClip mc1, mc2, mc3, mc4, mc5, mc6, mc7, dejagnuclip;
+ SWFDisplayItem it;
+
+ Ming_init();
+ mo = newSWFMovieWithVersion(OUTPUT_VERSION);
+ SWFMovie_setDimension(mo, 800, 600);
+ SWFMovie_setRate (mo, 1.0);
+ /*
+ * Don't add dejagnu clip to this file.
+ * Or place it in a safe depth.
+ */
+
+ mc1 = defineMovieclip(0, 0, 30, 30);
+ mc2 = defineMovieclip(0, 0, 60, 60);
+ mc3 = defineMovieclip(0, 0, 90, 90);
+ mc4 = defineMovieclip(0, 0, 120, 120);
+ mc5 = defineMovieclip(0, 0, 150, 150);
+ mc6 = defineMovieclip(0, 0, 180, 180);
+ mc7 = defineMovieclip(0, 0, 210, 210);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc1);
+ SWFDisplayItem_setDepth(it, 1);
+ SWFDisplayItem_setMaskLevel(it, 4);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc2);
+ SWFDisplayItem_setDepth(it, 2);
+ SWFDisplayItem_setMaskLevel(it, 5);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc3);
+ SWFDisplayItem_setDepth(it, 3);
+ SWFDisplayItem_setMaskLevel(it, 6);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc4);
+ SWFDisplayItem_setDepth(it, 4);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc5);
+ SWFDisplayItem_setDepth(it, 5);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc6);
+ SWFDisplayItem_setDepth(it, 6);
+
+ SWFMovie_nextFrame(mo);
+
+ it = SWFMovie_add(mo, (SWFBlock)mc7);
+ SWFDisplayItem_setDepth(it, 7);
+
+ SWFMovie_nextFrame(mo);
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
+
+
+
Index: testsuite/misc-ming.all/masks_test2runner.cpp
===================================================================
RCS file: testsuite/misc-ming.all/masks_test2runner.cpp
diff -N testsuite/misc-ming.all/masks_test2runner.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/masks_test2runner.cpp 22 Aug 2007 05:55:09
-0000 1.1
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ *
+ */
+
+#define INPUT_FILENAME "masks_test2.swf"
+
+#include "MovieTester.h"
+#include "sprite_instance.h"
+#include "character.h"
+#include "dlist.h"
+#include "container.h"
+#include "log.h"
+
+#include "check.h"
+#include <string>
+#include <cassert>
+
+using namespace gnash;
+using namespace std;
+
+int
+main(int /*argc*/, char** /*argv*/)
+{
+ //string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME);
+ string filename = string(INPUT_FILENAME);
+ MovieTester tester(filename);
+
+ gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
+ dbglogfile.setVerbosity(1);
+
+
+ rgba red(255,0,0,255);
+ rgba white(255, 255, 255, 255);
+
+ sprite_instance* root = tester.getRootMovie();
+ assert(root);
+ check_equals(root->get_frame_count(), 2);
+ // FRAME 1
+ check_pixel(15, 15, 30, red, 2);
+ // visual checks succeed with AGG pixel format RGB24
+ // don't know why this check fails with AGG and pixel foramt AGG_RGB555
+ xcheck_pixel(40, 40, 10, white, 3);
+
+ // FRAME 2
+ tester.advance();
+ check_pixel(105, 105, 210, red, 2);
+ check_pixel(220, 220, 10, white, 2);
+}
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...,
Zou Lunkai <=