[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10450: Minor fixes.
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10450: Minor fixes. |
Date: |
Wed, 17 Dec 2008 17:11:23 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10450
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2008-12-17 17:11:23 +0100
message:
Minor fixes.
modified:
libcore/Bitmap.cpp
libcore/Bitmap.h
libcore/Button.cpp
libcore/asobj/LocalConnection.cpp
libcore/asobj/flash/display/BitmapData_as.cpp
------------------------------------------------------------
revno: 10444.1.16
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Wed 2008-12-17 11:24:25 +0100
message:
Explicitly override pointInShape to use pointInBounds for Bitmap, as they
should be the same.
modified:
libcore/Bitmap.cpp
libcore/Bitmap.h
libcore/asobj/flash/display/BitmapData_as.cpp
------------------------------------------------------------
revno: 10444.1.17
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Wed 2008-12-17 12:32:50 +0100
message:
Cut down LocalConnection logging.
modified:
libcore/asobj/LocalConnection.cpp
------------------------------------------------------------
revno: 10444.1.18
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Wed 2008-12-17 12:48:32 +0100
message:
Buttons can be placed with an initObj, so don't abort.
Remove logging.
modified:
libcore/Bitmap.cpp
libcore/Button.cpp
libcore/asobj/flash/display/BitmapData_as.cpp
=== modified file 'libcore/Bitmap.cpp'
--- a/libcore/Bitmap.cpp 2008-12-17 09:14:56 +0000
+++ b/libcore/Bitmap.cpp 2008-12-17 11:48:32 +0000
@@ -52,6 +52,11 @@
update();
}
+bool
+Bitmap::pointInShape(boost::int32_t x, boost::int32_t y) const
+{
+ return pointInBounds(x, y);
+}
void
Bitmap::display()
@@ -74,8 +79,6 @@
bounds.expand_to_transformed_rect(getWorldMatrix(), getBounds());
ranges.add(bounds.getRange());
- log_debug("ranges now: %s", ranges);
-
}
rect
=== modified file 'libcore/Bitmap.h'
--- a/libcore/Bitmap.h 2008-12-17 09:14:56 +0000
+++ b/libcore/Bitmap.h 2008-12-17 10:24:25 +0000
@@ -48,6 +48,8 @@
virtual rect getBounds() const;
+ virtual bool pointInShape(boost::int32_t x, boost::int32_t y) const;
+
virtual void stagePlacementCallback(as_object* initObj = 0);
protected:
=== modified file 'libcore/Button.cpp'
--- a/libcore/Button.cpp 2008-12-11 13:07:41 +0000
+++ b/libcore/Button.cpp 2008-12-17 11:48:32 +0000
@@ -878,9 +878,12 @@
Button::stagePlacementCallback(as_object* initObj)
{
- // A Button cannot be created dynamically, so can't have an
- // initObj.
- assert(!initObj);
+ // Not sure how this can happen, but blip.tv does it.
+ if (initObj) {
+ log_unimpl("Button placed with an initObj. How did this happen? "
+ "We'll copy the properties anyway");
+ copyProperties(*initObj);
+ }
saveOriginalTarget(); // for soft refs
@@ -901,10 +904,12 @@
character* ch =
bdef.m_character_def->create_character_instance(this, ch_id);
ch->setMatrix(mat, true); // update caches
- ch->set_cxform(cx); // TODO: who cares about color ?
- ch->set_depth(ch_depth); // TODO: check if we care about depth, and
why ...
+
+ // TODO: who cares about color, depth etc.
+ ch->set_cxform(cx);
+ ch->set_depth(ch_depth);
assert(ch->get_parent() == this);
- assert(ch->get_name().empty()); // no way to specify a name for button
chars anyway...
+ assert(ch->get_name().empty());
_hitCharacters.push_back(ch);
}
@@ -936,7 +941,7 @@
ch->set_cxform(cx);
ch->set_depth(ch_depth);
assert(ch->get_parent() == this);
- assert(ch->get_name().empty()); // no way to specify a name for button
chars anyway...
+ assert(ch->get_name().empty());
if ( ch->wantsInstanceName() )
{
@@ -948,7 +953,6 @@
ch->stagePlacementCallback(); // give this character a life
}
- // there's no INITIALIZE/CONSTRUCT/LOAD/ENTERFRAME/UNLOAD events for
buttons
}
#ifdef GNASH_USE_GC
=== modified file 'libcore/asobj/LocalConnection.cpp'
--- a/libcore/asobj/LocalConnection.cpp 2008-12-01 12:21:59 +0000
+++ b/libcore/asobj/LocalConnection.cpp 2008-12-17 11:32:50 +0000
@@ -86,7 +86,6 @@
as_value
localconnection_new(const fn_call& /* fn */)
{
- GNASH_REPORT_FUNCTION;
LocalConnection *localconnection_obj = new LocalConnection;
return as_value(localconnection_obj);
@@ -96,7 +95,6 @@
as_value
localconnection_close(const fn_call& fn)
{
- GNASH_REPORT_FUNCTION;
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
@@ -108,7 +106,6 @@
as_value
localconnection_connect(const fn_call& fn)
{
- GNASH_REPORT_FUNCTION;
// log_debug("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
@@ -130,7 +127,6 @@
as_value
localconnection_domain(const fn_call& fn)
{
- GNASH_REPORT_FUNCTION;
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
VM& vm = ptr->getVM();
@@ -143,13 +139,13 @@
as_value
localconnection_send(const fn_call& fn)
{
- GNASH_REPORT_FUNCTION;
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
std::ostringstream os;
fn.dump_args(os);
- // It is useful to see what's supposed being sent, so we log this every
time.
+ // It is useful to see what's supposed being sent, so we log
+ // this every time.
log_unimpl(_("LocalConnection.send unimplemented %s"), os.str());
if (!ptr->connected()) {
@@ -169,7 +165,6 @@
void
attachLocalConnectionInterface(as_object& o)
{
- GNASH_REPORT_FUNCTION;
o.init_member("close", new builtin_function(localconnection_close));
o.init_member("connect", new builtin_function(localconnection_connect));
@@ -180,7 +175,6 @@
as_object*
getLocalConnectionInterface()
{
- GNASH_REPORT_FUNCTION;
static boost::intrusive_ptr<as_object> o;
@@ -227,19 +221,16 @@
as_object(getLocalConnectionInterface()),
_connected(false)
{
- GNASH_REPORT_FUNCTION;
}
LocalConnection::~LocalConnection()
{
- GNASH_REPORT_FUNCTION;
}
/// \brief Closes (disconnects) the LocalConnection object.
void
LocalConnection::close()
{
- GNASH_REPORT_FUNCTION;
#ifndef NETWORK_CONN
closeMem();
#endif
@@ -260,7 +251,6 @@
bool
LocalConnection::connect(const std::string& name)
{
- GNASH_REPORT_FUNCTION;
if (name.empty()) {
_name = "none, sysv segment type";
@@ -295,7 +285,6 @@
std::string
LocalConnection::domain(int version)
{
-// GNASH_REPORT_FUNCTION;
// We already figured out the name
if (_name.size()) {
return _name;
=== modified file 'libcore/asobj/flash/display/BitmapData_as.cpp'
--- a/libcore/asobj/flash/display/BitmapData_as.cpp 2008-12-17 09:10:25
+0000
+++ b/libcore/asobj/flash/display/BitmapData_as.cpp 2008-12-17 11:48:32
+0000
@@ -100,6 +100,10 @@
std::mem_fun(&character::setReachable));
}
+
+/// This function should write RGBA data to the _bitmapData array.
+//
+/// TODO: it needs to know what to do about transparency.
void
BitmapData_as::update(const boost::uint8_t* data)
{
@@ -285,7 +289,8 @@
as_value
BitmapData_copyPixels(const fn_call& fn)
{
- boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ boost::intrusive_ptr<BitmapData_as> ptr =
+ ensureType<BitmapData_as>(fn.this_ptr);
UNUSED(ptr);
LOG_ONCE( log_unimpl (__FUNCTION__) );
return as_value();
@@ -296,7 +301,8 @@
{
// Should free the memory storing the bitmap.
// All properties afterwards are -1 (even the rectangle)
- boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ boost::intrusive_ptr<BitmapData_as> ptr =
+ ensureType<BitmapData_as>(fn.this_ptr);
ptr->dispose();
return as_value();
}
@@ -309,7 +315,7 @@
std::ostringstream os;
fn.dump_args(os);
- log_unimpl("BitmapData.draw(%s) called", os.str());
+ log_unimpl("BitmapData.draw(%s)", os.str());
if (!fn.nargs) {
//log error
@@ -347,7 +353,8 @@
as_value
BitmapData_fillRect(const fn_call& fn)
{
- boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ boost::intrusive_ptr<BitmapData_as> ptr =
+ ensureType<BitmapData_as>(fn.this_ptr);
if (fn.nargs < 2) return as_value();
@@ -359,7 +366,8 @@
IF_VERBOSE_ASCODING_ERRORS(
std::ostringstream ss;
fn.dump_args(ss);
- log_aserror("Matrix.deltaTransformPoint(%s): needs an object",
ss.str());
+ log_aserror("Matrix.deltaTransformPoint(%s): needs an object",
+ ss.str());
);
return as_value();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10450: Minor fixes.,
Benjamin Wolsey <=