diff options
-rw-r--r-- | dw/fltkimgbuf.cc | 5 | ||||
-rw-r--r-- | dw/image.cc | 2 | ||||
-rw-r--r-- | dw/imgbuf.hh | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc index 86497160..e537c761 100644 --- a/dw/fltkimgbuf.cc +++ b/dw/fltkimgbuf.cc @@ -78,6 +78,8 @@ void FltkImgbuf::freeall () FltkImgbuf::FltkImgbuf (Type type, int width, int height, double gamma) { + DBG_OBJ_CREATE ("dw::fltk::FltkImgbuf"); + _MSG("FltkImgbuf: new root %p\n", this); init (type, width, height, gamma, NULL); } @@ -124,6 +126,9 @@ void FltkImgbuf::init (Type type, int width, int height, double gamma, this->height = height; this->gamma = gamma; + DBG_OBJ_SET_NUM ("width", width); + DBG_OBJ_SET_NUM ("height", height); + // TODO: Maybe this is only for root buffers switch (type) { case RGBA: bpp = 4; break; diff --git a/dw/image.cc b/dw/image.cc index 1421418e..74f96e57 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -437,6 +437,8 @@ void Image::setBuffer (core::Imgbuf *buffer, bool resize) buffer->ref (); } + DBG_OBJ_ASSOC_CHILD (this->buffer); + if (oldBuf) oldBuf->unref (); } diff --git a/dw/imgbuf.hh b/dw/imgbuf.hh index 3ccbe3c5..f9870bcf 100644 --- a/dw/imgbuf.hh +++ b/dw/imgbuf.hh @@ -5,6 +5,8 @@ # error Do not include this file directly, use "core.hh" instead. #endif +#include "../lout/debug.hh" + namespace dw { namespace core { @@ -161,6 +163,12 @@ class Imgbuf: public lout::object::Object, public lout::signal::ObservedObject public: enum Type { RGB, RGBA, GRAY, INDEXED, INDEXED_ALPHA }; + inline Imgbuf () { + DBG_OBJ_CREATE ("dw::core::Imgbuf"); + DBG_OBJ_BASECLASS (lout::object::Object); + DBG_OBJ_BASECLASS (lout::signal::ObservedObject); + } + /* * Methods called from the image decoding */ |