X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fimages%2Fimage-impl.cpp;h=8357fcfa8928e4f5e928dc1e414a47b2c0d4f1bb;hb=698c38bd1a76158dd449639aaf014d7046dd3ae4;hp=e90ffebd6d932fde31f580d5ab90fa9a1625e8a0;hpb=ff364987bf3c2ef5bb2b57348747eeb784d8ba90;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/images/image-impl.cpp b/dali/internal/event/images/image-impl.cpp index e90ffeb..8357fcf 100644 --- a/dali/internal/event/images/image-impl.cpp +++ b/dali/internal/event/images/image-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 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. @@ -26,9 +26,7 @@ #include #include -#include #include -#include #include using namespace Dali::Integration; @@ -55,7 +53,7 @@ Dali::SignalConnectorType signalConnector1( mType, SIGNAL_IMAGE_UPLOADED, &Image bool Image::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - DALI_ASSERT_DEBUG( dynamic_cast( object ) && "Resource ticket not ImageTicket subclass for image resource.\n" ); + DALI_ASSERT_DEBUG( dynamic_cast( object ) && "Failed to downcast from BaseObject to Image.\n" ); Image* image = static_cast(object); if( 0 == strcmp( signalName.c_str(), SIGNAL_IMAGE_UPLOADED ) ) @@ -71,28 +69,6 @@ bool Image::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra return connected; } -ResourceId Image::GetResourceId() const -{ - ResourceId ret = mTicket ? mTicket->GetId() : 0; - - return ret; -} - -void Image::ResourceLoadingFailed(const ResourceTicket& ticket) -{ - // do nothing -} - -void Image::ResourceLoadingSucceeded(const ResourceTicket& ticket) -{ - // do nothing -} - -void Image::ResourceUploaded(const ResourceTicket& ticket) -{ - mUploaded.Emit( Dali::Image( this ) ); -} - unsigned int Image::GetWidth() const { return mWidth; @@ -105,11 +81,12 @@ unsigned int Image::GetHeight() const Vector2 Image::GetNaturalSize() const { - return Vector2( mWidth, mHeight ); + return Vector2( static_cast( mWidth ), static_cast( mHeight ) ); } Image::Image() -: mWidth( 0 ), +: mTexture(), + mWidth( 0 ), mHeight( 0 ), mConnectionCount( 0 ) { @@ -117,12 +94,6 @@ Image::Image() Image::~Image() { - if( mTicket ) - { - mTicket->RemoveObserver( *this ); - mTicket.Reset(); - } - if( Stage::IsInstalled() ) { UnregisterObject();