/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
if( !XDestroyImage(mXImage) )
{
- DALI_ASSERT_DEBUG("XImage deallocation failure");
+ DALI_LOG_ERROR("XImage deallocation failure");
}
}
}
DALI_ASSERT_DEBUG(pXImage && "XImage (from pixmap) could not be retrieved from the server");
if(!pXImage)
{
- DALI_LOG_ERROR("Could not retrieve Ximage.");
+ DALI_LOG_ERROR("Could not retrieve Ximage.\n");
}
else
{
pixbuf.resize(width*height*4);
unsigned * bufPtr = reinterpret_cast<unsigned *>(&pixbuf[0]);
const unsigned xDataLineSkip = pXImage->bytes_per_line;
- const size_t copy_count = width * 4;
+ const size_t copy_count = static_cast< size_t >( width ) * 4;
pixelFormat = Pixel::BGRA8888;
for(unsigned y = height-1; y < height; --y, bufPtr += width)
}
else
{
- DALI_LOG_ERROR("XImage has null data pointer.");
+ DALI_LOG_ERROR("XImage has null data pointer.\n");
}
break;
}
}
default:
{
- DALI_LOG_WARNING("Pixmap has unsupported bit-depth for getting pixels: %u", pXImage->depth);
+ DALI_LOG_WARNING("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
}
}
}
if(!success)
{
- DALI_LOG_ERROR("Failed to get pixels from NativeImageSource.");
+ DALI_LOG_ERROR("Failed to get pixels from NativeImageSource.\n");
pixbuf.resize(0);
width = 0;
height = 0;
return false;
}
-void NativeImageSource::SetNativeImageSource( Any nativeImageSource )
+void NativeImageSource::SetSource( Any source )
{
- mPixmap = GetPixmapFromAny( nativeImageSource );
+ mPixmap = GetPixmapFromAny( source );
if (mPixmap)
{
}
}
+bool NativeImageSource::IsColorDepthSupported( Dali::NativeImageSource::ColorDepth colorDepth )
+{
+ return true;
+}
+
bool NativeImageSource::GlExtensionCreate()
{
// if the image existed previously delete it.
return 0;
}
+void NativeImageSource::PrepareTexture()
+{
+}
+
int NativeImageSource::GetPixelDepth(Dali::NativeImageSource::ColorDepth depth) const
{
switch (depth)