Go to the documentation of this file.
25 #if GNASH_PARANOIA_LEVEL > 1 && !defined(NDEBUG)
41 #ifndef GNASH_PARANOIA_LEVEL
42 # define GNASH_PARANOIA_LEVEL 1
119 bool use_old_matrix);
164 const SWFMatrix* mat, std::uint16_t* ratio);
266 template <
class V>
inline void visitAll(
V& visitor);
267 template <
class V>
inline void visitAll(
V& visitor)
const;
275 return _charsByDepth.size();
280 return _charsByDepth.empty();
298 return _charsByDepth == other._charsByDepth;
302 return _charsByDepth != other._charsByDepth;
305 #if GNASH_PARANOIA_LEVEL > 1 && !defined(NDEBUG)
313 std::set<int> depths;
315 itEnd = _charsByDepth.end(); it != itEnd; ++it) {
319 if (!depths.insert(depth).second) {
320 log_debug(
"Depth %d is duplicated in DisplayList %p",
321 depth, (
const void*)
this);
325 if (_charsByDepth.empty())
return;
327 assert(std::adjacent_find(_charsByDepth.begin(), _charsByDepth.end(),
328 DepthGreaterThan()) == _charsByDepth.end());
356 itEnd = _charsByDepth.rend(); it != itEnd; ++it) {
357 if (!visitor(*it))
break;
366 itEnd = _charsByDepth.rend(); it != itEnd; ++it) {
367 if (!visitor(*it))
break;
394 #endif // GNASH_DLIST_H
void set_depth(int d)
Definition: DisplayObject.h:270
void testInvariant() const
Definition: DisplayList.h:331
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
void visitAll(V &visitor)
Visit each and all DisplayObject in the list.
Definition: DisplayList.h:373
void transformedByScript()
Call this function when the sprite has been transformed due to ActionScript code.
Definition: DisplayObject.h:611
A general use string table.
Definition: string_table.h:42
static const int staticDepthOffset
Definition: DisplayObject.h:205
void log_debug(StringType msg, Args... args)
Definition: log.h:301
@ i
Definition: GnashKey.h:155
void add_invalidated_bounds(InvalidatedRanges &ranges, bool force)
Definition: DisplayList.cpp:619
std::string typeName(const T &inst)
Definition: utility.h:93
#define _(String)
Definition: log.h:44
void add(DisplayObject *ch, bool replace)
Add a DisplayObject in the list, maintaining depth-order.
Definition: DisplayList.cpp:212
std::list< DisplayObject * > container_type
Definition: DisplayList.h:69
bool isDestroyed() const
Return true if this DisplayObject was destroyed.
Definition: DisplayObject.h:807
const SWFCxForm & getCxForm(const DisplayObject &o)
Definition: DisplayObject.h:1125
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
void swapDepths(DisplayObject *ch, int depth)
Change depth of the given DisplayObjects in the list, swapping with any existing DisplayObject at tar...
Definition: DisplayList.cpp:372
void set_ratio(std::uint16_t r)
Definition: DisplayObject.h:362
Base class for render handlers.
Definition: Renderer.h:189
bool isDynamicMask() const
Definition: DisplayObject.h:404
void setMatrix(const SWFMatrix &m, bool updateCache=false)
Set local transform SWFMatrix for this DisplayObject.
Definition: DisplayObject.cpp:395
std::string DSOEXPORT getTarget() const
Return full path to this object, in dot notation.
Definition: DisplayObject.cpp:621
DSOTEXPORT void placeDisplayObject(DisplayObject *ch, int depth)
Place a new DisplayObject at the specified depth, replacing any existing DisplayObject at the same de...
Definition: DisplayList.cpp:172
bool isDynamic() const
Was this DisplayObject dynamically created ?
Definition: DisplayObject.h:592
virtual void disable_mask()=0
void log_error(StringType msg, Args... args)
Definition: log.h:283
void inheritConfig(const SnappingRanges2d< T > &from)
Definition: snappingrange.h:155
void removeUnloaded()
Remove all unloaded DisplayObject from the list.
Definition: DisplayList.cpp:917
int getNextHighestDepth() const
Return the next highest available depth.
Definition: DisplayList.cpp:117
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
A list of on-stage DisplayObjects, ordered by depth.
Definition: DisplayList.h:65
virtual void omit_display()
Definition: DisplayObject.h:750
DSOTEXPORT DisplayObject * getDisplayObjectAtDepth(int depth) const
May return NULL.
Definition: DisplayList.cpp:133
void omit_display()
Definition: DisplayList.cpp:609
bool get_accept_anim_moves() const
Return true if PlaceObjects tag are allowed to move this DisplayObject.
Definition: DisplayObject.h:573
int get_depth() const
Definition: DisplayObject.h:268
container_type::reverse_iterator reverse_iterator
Definition: DisplayList.h:72
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
void intersect(const SnappingRanges2d< T > &o)
Definition: snappingrange.h:425
container_type::const_reverse_iterator const_reverse_iterator
Definition: DisplayList.h:73
int get_clip_depth() const
Definition: DisplayObject.h:375
friend std::ostream & operator<<(std::ostream &, const DisplayList &)
Output operator.
Definition: DisplayList.cpp:975
void setCxForm(const SWFCxForm &cx)
Definition: DisplayObject.h:352
@ p
Definition: GnashKey.h:162
@ _1
Definition: GnashKey.h:95
void destroy()
destroy all DisplayObjects in this DisplayList
Definition: DisplayList.cpp:516
void replaceDisplayObject(DisplayObject *ch, int depth, bool use_old_cxform, bool use_old_matrix)
Replace the old DisplayObject at the specified depth with the given new DisplayObject.
Definition: DisplayList.cpp:230
void set_invalidated()
This function marks the DisplayObject as being modified in aspect and keeps track of current invalida...
Definition: DisplayObject.cpp:183
DSOTEXPORT DisplayObject * getDisplayObjectByName(string_table &st, const ObjectURI &uri, bool caseless) const
If there are multiples, returns the first match only!
Definition: DisplayList.cpp:155
Definition: SWFMatrix.h:54
void mergeDisplayList(DisplayList &newList, DisplayObject &o)
Merge the given display list.
Definition: DisplayList.cpp:732
void visitBackward(V &visitor)
Visit each DisplayObject in the list in reverse depth order (higher depth first).
Definition: DisplayList.h:353
bool unloaded() const
Return true if this DisplayObject was unloaded from the stage.
Definition: DisplayObject.h:785
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
DisplayObject * parent() const
Return the parent of this DisplayObject, or NULL if the DisplayObject has no parent.
Definition: DisplayObject.h:252
void add(const RangeType &range)
Add a Range to the set, merging when possible and appropriate.
Definition: snappingrange.h:250
void display(Renderer &renderer, const Transform &xform)
Display the list's DisplayObjects.
Definition: DisplayList.cpp:541
bool isMaskLayer() const
Definition: DisplayObject.h:390
@ V
Definition: GnashKey.h:134
virtual void end_submit_mask()=0
bool operator!=(const DisplayList &other) const
Definition: DisplayList.h:301
container_type::const_iterator const_iterator
Definition: DisplayList.h:71
#define DSOTEXPORT
Definition: dsodefs.h:63
virtual void add_invalidated_bounds(InvalidatedRanges &ranges, bool force)
Add the DisplayObject's invalidated bounds to the given ranges list.
Definition: DisplayObject.cpp:226
uri
Definition: test.py:12
@ c
Definition: GnashKey.h:149
bool boundsInClippingArea(Renderer &renderer) const
Definition: DisplayObject.cpp:784
virtual void begin_submit_mask()=0
void insertDisplayObject(DisplayObject *obj, int index)
Inserts a DisplayObject at the specified index (depth)
Definition: DisplayList.cpp:447
static const int removedDepthOffset
Definition: DisplayObject.h:222
container_type::iterator iterator
Definition: DisplayList.h:70
~DisplayList()
Definition: DisplayList.h:76
virtual void display(Renderer &renderer, const Transform &xform)=0
Render the DisplayObject.
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
virtual void destroy()
Mark this DisplayObject as destroyed.
Definition: DisplayObject.cpp:677
DisplayList()
Definition: DisplayList.h:75
bool unload()
Unload this instance from the stage.
Definition: DisplayObject.cpp:448
void moveDisplayObject(int depth, const SWFCxForm *color_xform, const SWFMatrix *mat, std::uint16_t *ratio)
Updates the transform properties of the object at the specified depth, unless its get_accept_anim_mov...
Definition: DisplayList.cpp:294
void removeDisplayObject(int depth)
Removes the object at the specified depth.
Definition: DisplayList.cpp:331
std::uint16_t get_ratio() const
Definition: DisplayObject.h:360
bool caseless(const as_object &o)
Return whether property matching is caseless.
Definition: as_object.h:924
@ o
Definition: GnashKey.h:161
const SWFMatrix & getMatrix(const DisplayObject &o)
Get local transform SWFMatrix for this DisplayObject.
Definition: DisplayObject.h:1119
void extend_invalidated_bounds(const InvalidatedRanges &ranges)
Definition: DisplayObject.cpp:247
A URI for describing as_objects.
Definition: ObjectURI.h:45
bool isReferenceable(const DisplayObject &d)
Returns true if the DisplayObject is referenceable in ActionScript.
Definition: DisplayObject.h:1149
@ e
Definition: GnashKey.h:151
bool empty() const
Return true if the list contains no elements.
Definition: DisplayList.h:279
bool operator==(const DisplayList &other) const
Definition: DisplayList.h:297
size_t size() const
Return number of elements in the list.
Definition: DisplayList.h:274
bool unload()
Definition: DisplayList.cpp:477
bool visible() const
Definition: DisplayObject.h:623
std::ostream & operator<<(std::ostream &o, const URL &u)
Definition: URL.cpp:447