[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9717: link with new asobj3 library,
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9717: link with new asobj3 library, not the old one. Bitmap is not supported yet. |
Date: |
Fri, 01 May 2009 16:58:47 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 9717
committer: address@hidden
branch nick: avm2
timestamp: Fri 2009-05-01 16:58:47 -0600
message:
link with new asobj3 library, not the old one. Bitmap is not supported yet.
modified:
libcore/Bitmap.cpp
libcore/Bitmap.h
libcore/MovieClip.cpp
libcore/MovieClip.h
libcore/asobj/ClassHierarchy.cpp
libcore/asobj3/display/BitmapData_as3.h
libcore/asobj3/gen-as3.sh
=== modified file 'libcore/Bitmap.cpp'
--- a/libcore/Bitmap.cpp 2009-04-30 22:33:31 +0000
+++ b/libcore/Bitmap.cpp 2009-05-01 22:58:47 +0000
@@ -29,11 +29,11 @@
:
DisplayObject(parent, id),
_bitmapData(bd),
- _bitmapInfo(0),
- _width(_bitmapData->getWidth()),
- _height(_bitmapData->getHeight())
+ _bitmapInfo(0)
+// _width(_bitmapData->getWidth()),
+// _height(_bitmapData->getHeight())
{
- _shape.setBounds(rect(0, 0, pixelsToTwips(_width),
pixelsToTwips(_height)));
+ _shape.setBounds(rect(0, 0, pixelsToTwips(_width),
pixelsToTwips(_height)));
}
Bitmap::Bitmap(const BitmapMovieDefinition* const def, DisplayObject* parent,
@@ -63,7 +63,11 @@
Bitmap::stagePlacementCallback(as_object* initObj)
{
assert(!initObj);
- if (_bitmapData) _bitmapData->registerBitmap(this);
+#if 0
+ if (_bitmapData) {
+ _bitmapData->registerBitmap(this);
+ }
+#endif
update();
}
@@ -106,6 +110,7 @@
Bitmap::makeBitmap()
{
+#if 0
const BitmapData_as3::BitmapArray& data = _bitmapData->getBitmapData();
std::auto_ptr<GnashImage> im(new ImageRGBA(_width, _height));
@@ -115,7 +120,7 @@
boost::uint8_t* row = im->scanline(i);
for (size_t j = 0; j < _width; ++j) {
- const BitmapData_as3::BitmapArray::value_type pixel =
+ const BitmapData_as::BitmapArray::value_type pixel =
data[i * _width + j];
row[j * 4] = (pixel & 0x00ff0000) >> 16;
row[j * 4 + 1] = (pixel & 0x0000ff00) >> 8;
@@ -123,8 +128,9 @@
row[j * 4 + 3] = (pixel & 0xff000000) >> 24;
}
}
-
+
_bitmapInfo = render::createBitmapInfo(im);
+#endif
}
@@ -136,7 +142,8 @@
/// Nothing to do for disposed bitmaps.
if (_def && !_bitmapData) return;
- const BitmapData_as3::BitmapArray& data = _bitmapData->getBitmapData();
+#if 0
+ const BitmapData_as::BitmapArray& data = _bitmapData->getBitmapData();
/// In this case, dispose() was called. It seems like a good idea to
/// set _bitmapData to 0 to avoid any further interaction.
@@ -145,6 +152,8 @@
_shape.clear();
return;
}
+#endif
+
}
void
=== modified file 'libcore/Bitmap.h'
--- a/libcore/Bitmap.h 2009-04-15 12:27:37 +0000
+++ b/libcore/Bitmap.h 2009-05-01 22:58:47 +0000
@@ -21,7 +21,7 @@
#include "DisplayObject.h"
#include "BitmapInfo.h"
-#include "flash/display/BitmapData_as.h"
+#include "asobj3/display/BitmapData_as3.h"
#include "render.h"
#include "BitmapMovieDefinition.h"
#include "DynamicShape.h"
@@ -39,14 +39,14 @@
/// For non-dynamic Bitmap DisplayObjects, the bitmap data never changes. The
/// update() function is called once on stage placement.
//
-/// For dynamic Bitmap DisplayObjects, the attached BitmapData_as should call
+/// For dynamic Bitmap DisplayObjects, the attached BitmapData_as3 should call
/// update() whenever the data changes. This Bitmap registers itself with
-/// the BitmapData_as on stage placement.
+/// the BitmapData_as3 on stage placement.
class Bitmap : public DisplayObject
{
public:
- Bitmap(boost::intrusive_ptr<BitmapData_as> bd, DisplayObject* parent,
+ Bitmap(boost::intrusive_ptr<BitmapData_as3> bd, DisplayObject* parent,
int id);
Bitmap(const BitmapMovieDefinition* const def, DisplayObject* parent,
@@ -82,15 +82,15 @@
/// Return the bitmap used for this Bitmap DisplayObject.
//
- /// It comes either from the definition or the BitmapData_as.
+ /// It comes either from the definition or the BitmapData_as3.
const BitmapInfo* bitmap() const;
- /// This updates _bitmapInfo from the BitmapData_as
+ /// This updates _bitmapInfo from the BitmapData_as3
void makeBitmap();
- /// Checks whether an attached BitmapData_as is disposed.
+ /// Checks whether an attached BitmapData_as3 is disposed.
//
- /// If the BitmapData_as has been disposed, deletes _bitmapData.
+ /// If the BitmapData_as3 has been disposed, deletes _bitmapData.
/// and clears the DynamicShape.
void checkBitmapData();
@@ -102,7 +102,7 @@
const boost::intrusive_ptr<const BitmapMovieDefinition> _def;
- boost::intrusive_ptr<BitmapData_as> _bitmapData;
+ boost::intrusive_ptr<BitmapData_as3> _bitmapData;
/// The current bitmap information is stored here.
boost::intrusive_ptr<BitmapInfo> _bitmapInfo;
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp 2009-04-16 10:00:54 +0000
+++ b/libcore/MovieClip.cpp 2009-05-01 22:58:47 +0000
@@ -56,7 +56,7 @@
#include "styles.h" // for cap_style_e and join_style_e enums
#include "PlaceObject2Tag.h"
#include "NetStream_as.h"
-#include "flash/display/BitmapData_as.h"
+#include "asobj3/display/BitmapData_as3.h"
#include "flash/geom/Matrix_as.h"
#include "ExportableResource.h"
#include "GnashNumeric.h"
@@ -1461,7 +1461,7 @@
}
void
-MovieClip::attachBitmap(boost::intrusive_ptr<BitmapData_as> bd, int depth)
+MovieClip::attachBitmap(boost::intrusive_ptr<BitmapData_as3> bd, int depth)
{
DisplayObject* ch = new Bitmap(bd, this, 0);
attachCharacter(*ch, depth, 0);
@@ -4990,7 +4990,7 @@
}
as_object* obj = fn.arg(0).to_object().get();
- boost::intrusive_ptr<BitmapData_as> bd = dynamic_cast<BitmapData_as*>(obj);
+ boost::intrusive_ptr<BitmapData_as3> bd =
dynamic_cast<BitmapData_as3*>(obj);
if (!bd) {
IF_VERBOSE_ASCODING_ERRORS(
=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h 2009-04-15 05:54:30 +0000
+++ b/libcore/MovieClip.h 2009-05-01 22:58:47 +0000
@@ -34,6 +34,7 @@
#include "DynamicShape.h" // for composition
#include "Range2d.h"
#include "dsodefs.h" // for DSOEXPORT
+#include "asobj3/display/BitmapData_as3.h"
#ifdef USE_SWFTREE
# include "tree.hh"
@@ -651,7 +652,7 @@
void removeMovieClip();
/// Create a Bitmap DisplayObject at the specified depth.
- void attachBitmap(boost::intrusive_ptr<BitmapData_as> bd, int depth);
+ void attachBitmap(boost::intrusive_ptr<BitmapData_as3> bd, int depth);
/// Render this MovieClip to a GnashImage using the passed transform
//
=== modified file 'libcore/asobj/ClassHierarchy.cpp'
--- a/libcore/asobj/ClassHierarchy.cpp 2009-03-24 10:56:52 +0000
+++ b/libcore/asobj/ClassHierarchy.cpp 2009-05-01 22:58:47 +0000
@@ -65,7 +65,7 @@
#include "XML_as.h"
#include "XMLNode_as.h"
#include "asClass.h"
-#include "flash/text/TextFieldAutoSize_as.h"
+#include "asobj3/text/TextFieldAutoSize_as3.h"
namespace gnash {
@@ -326,7 +326,7 @@
{ Accessibility_class_init, NSV::CLASS_ACCESSIBILITY, NSV::CLASS_OBJECT,
NS_GLOBAL, 5 },
{ int_class_init, NSV::CLASS_INT, NSV::CLASS_OBJECT, 9 },
- { TextFieldAutoSize_class_init, NSV::CLASS_TEXTFIELDAUTOSIZE,
NSV::CLASS_OBJECT, 9 }
+ { textfieldautosize_class_init, NSV::CLASS_TEXTFIELDAUTOSIZE,
NSV::CLASS_OBJECT, 9 }
// These classes are all implicitly constructed; that is, it is not necessary
for
// the class name to be used to construct the class, so they must always be
available.
=== modified file 'libcore/asobj3/display/BitmapData_as3.h'
--- a/libcore/asobj3/display/BitmapData_as3.h 2009-05-01 00:44:08 +0000
+++ b/libcore/asobj3/display/BitmapData_as3.h 2009-05-01 22:58:47 +0000
@@ -27,7 +27,8 @@
#include "fn_call.h"
// Forward declarations
-class as_object;
+//class as_object;
+#include "as_object.h"
namespace gnash {
namespace {
=== modified file 'libcore/asobj3/gen-as3.sh'
--- a/libcore/asobj3/gen-as3.sh 2009-05-01 00:44:08 +0000
+++ b/libcore/asobj3/gen-as3.sh 2009-05-01 22:58:47 +0000
@@ -68,14 +68,14 @@
if test -f ${outname}; then
echo ${outname} exists!
- mv -f ${outname} ${outname}.orig
-# exit 1;
+# mv -f ${outname} ${outname}.orig
+ exit 1;
fi
if test -f ${srcname}; then
echo ${srcname} exists!
- mv -f ${srcname} ${outname}.orig
-# exit 1;
+# mv -f ${srcname} ${outname}.orig
+ exit 1;
fi
###############################################################
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/avm2 r9717: link with new asobj3 library, not the old one. Bitmap is not supported yet.,
rob <=