X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fimages%2Fresource-image-impl.cpp;h=9269e157391c4cd4bf393f7822f03e591fd8a909;hb=8af0fa76e966af31744fec96907f219559ce9a66;hp=dc116cc9e9c1f1d8bc647e6fbfac9cc2dfe06c32;hpb=dbb1ce9210c7ac437a687d94f1eec999359225a2;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/images/resource-image-impl.cpp b/dali/internal/event/images/resource-image-impl.cpp index dc116cc..9269e15 100644 --- a/dali/internal/event/images/resource-image-impl.cpp +++ b/dali/internal/event/images/resource-image-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -38,26 +38,6 @@ namespace Dali namespace Internal { -namespace -{ - -// Signals - -const char* const SIGNAL_IMAGE_LOADING_FINISHED = "imageLoadingFinished"; - - -BaseHandle CreateImage() -{ - ImagePtr image = ResourceImage::New(); - return Dali::Image(image.Get()); -} - -TypeRegistration mType( typeid( Dali::ResourceImage ), typeid( Dali::Image ), CreateImage ); - -Dali::SignalConnectorType signalConnector1( mType, SIGNAL_IMAGE_LOADING_FINISHED, &ResourceImage::DoConnectSignal ); - -} - ResourceImage::ResourceImage() : Image(), mLoadingFinished(), @@ -107,26 +87,6 @@ ResourceImage::~ResourceImage() { } -bool ResourceImage::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) -{ - bool connected( true ); - DALI_ASSERT_DEBUG( dynamic_cast( object ) && "Failed to downcast from BaseObject to ResourceImage.\n" ); - ResourceImage* image = static_cast(object); - - if( 0 == strcmp( signalName.c_str(), SIGNAL_IMAGE_LOADING_FINISHED ) ) - { - image->LoadingFinishedSignal().Connect( tracker, functor ); - } - else - { - // signalName does not match any signal - connected = false; - } - - return connected; -} - - const ImageAttributes& ResourceImage::GetAttributes() const { return mAttributes; @@ -159,7 +119,7 @@ void ResourceImage::Reload() mTexture = Texture::New( Dali::TextureType::TEXTURE_2D, format, width, height ); //Upload data to the texture - size_t bufferSize = bitmap->GetBufferSize(); + uint32_t bufferSize = bitmap->GetBufferSize(); PixelDataPtr pixelData = PixelData::New( bitmap->GetBufferOwnership(), bufferSize, width, height, format, static_cast< Dali::PixelData::ReleaseFunction >( bitmap->GetReleaseFunction() ) ); mTexture->Upload( pixelData ); @@ -201,7 +161,7 @@ unsigned int ResourceImage::GetHeight() const Vector2 ResourceImage::GetNaturalSize() const { - return Vector2(mWidth, mHeight); + return Vector2( static_cast( mWidth ), static_cast( mHeight ) ); }