// CLASS HEADER
#include <dali/integration-api/bitmap.h>
-// EXTERNAL INCLUDES
-
// INTERNAL INCLUDES
#include <dali/integration-api/debug.h>
#include <dali/integration-api/platform-abstraction.h>
}
}
-PixelBuffer* Bitmap::ReleaseBuffer()
-{
- PixelBuffer* const data = mData;
-
- // Ownership of mData has been transferred, so indicate that mData pointer is no longer valid:
- mData = NULL;
-
- return data;
-}
-
Bitmap::~Bitmap()
{
DALI_LOG_TRACE_METHOD(Debug::Filter::gImage);
{
return;
}
- delete [] mData;
+ free ( mData );
mData = NULL;
}
return mDiscardable == ResourcePolicy::OWNED_DISCARD;
}
- /**
- * Transfer ownership of the pixel buffer to the calling function.
- * @post bitmaps pixel data is set to NULL
- * @return the bitmaps pixel buffer
- */
- PixelBuffer* ReleaseBuffer();
/**
* Delete the pixel buffer data
*/
// CLASS HEADER
#include <dali/internal/event/images/bitmap-compressed.h>
-// INTERNAL INCLUDES
-#include <dali/internal/common/core-impl.h>
-#include <dali/integration-api/debug.h>
+// EXTERNAL INCLUDES
+#include <cstdlib>
// INTERNAL INCLUDES
#include <dali/internal/common/core-impl.h>
Initialize(pixelFormat, width, height, bufferSize);
- mData = new Dali::Integration::PixelBuffer[bufferSize];
+ mData = reinterpret_cast< Dali::Integration::PixelBuffer* >( malloc( bufferSize ) );
return mData;
}
// CLASS HEADER
#include <dali/internal/event/images/bitmap-packed-pixel.h>
+// EXTERNAL INCLUDES
+#include <cstdlib>
+
// INTERNAL INCLUDES
#include <dali/public-api/object/ref-object.h>
#include <dali/internal/common/core-impl.h>
//allocate buffer
unsigned int bufSize = mBufferWidth * mBufferHeight * mBytesPerPixel;
- mData = new Dali::Integration::PixelBuffer[bufSize];
+ mData = reinterpret_cast< Dali::Integration::PixelBuffer* >( malloc( bufSize) );
return mData;
}