// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
-#include <render-surface.h>
// INTERNAL INCLUDES
#include <gl/egl-image-extensions.h>
#include <gl/egl-factory.h>
#include <adaptor-impl.h>
+#include <render-surface.h>
// Allow this to be encoded and saved:
-#include <platform-abstractions/slp/resource-loader/resource-loader.h>
+#include <platform-abstractions/tizen/resource-loader/resource-loader.h>
#include <bitmap-saver.h>
namespace Dali
: mWidth( width ),
mHeight( height ),
mOwnPixmap( true ),
- mPixelFormat( Pixel::RGB888 ),
mColorDepth( depth ),
mEglImageKHR( NULL ),
mEglImageExtensions( NULL )
DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
EglFactory& eglFactory = Adaptor::GetImplementation( Adaptor::Get() ).GetEGLFactory();
mEglImageExtensions = eglFactory.GetImageExtensions();
+ SetBlending( mColorDepth );
+
DALI_ASSERT_DEBUG( mEglImageExtensions );
}
return 0;
}
-int PixmapImage::GetPixelDepth(Dali::PixmapImage::ColorDepth depth) const
-{
- switch (depth)
- {
- case Dali::PixmapImage::COLOR_DEPTH_8:
- {
- return 8;
- }
- case Dali::PixmapImage::COLOR_DEPTH_16:
- {
- return 16;
- }
- case Dali::PixmapImage::COLOR_DEPTH_24:
- {
- return 24;
- }
- case Dali::PixmapImage::COLOR_DEPTH_32:
- {
- return 32;
- }
- default:
- {
- DALI_ASSERT_DEBUG(0 && "unknown color enum");
- return 0;
- }
- }
-}
-
-void PixmapImage::SetPixelFormat(int depth)
+void PixmapImage::SetBlending(Dali::PixmapImage::ColorDepth depth)
{
- // store the pixel format based on the depth
switch (depth)
{
- case 8:
- {
- mPixelFormat = Pixel::A8;
- break;
- }
- case 16:
+ case Dali::PixmapImage::COLOR_DEPTH_16: //Pixel::RGB565
+ case Dali::PixmapImage::COLOR_DEPTH_24: // Pixel::RGB888
{
- mPixelFormat = Pixel::RGB565;
+ mBlendingRequired = false;
break;
}
- case 32:
+ case Dali::PixmapImage::COLOR_DEPTH_8: //Pixel::A8
+ case Dali::PixmapImage::COLOR_DEPTH_32: // Pixel::RGBA8888
{
- mPixelFormat = Pixel::RGBA8888;
+ mBlendingRequired = true;
break;
}
- case 24:
default:
{
- mPixelFormat = Pixel::RGB888;
- break;
+ DALI_ASSERT_DEBUG(0 && "unknown color enum");
}
}
}