From: Umar Date: Fri, 18 Nov 2016 10:58:55 +0000 (+0000) Subject: [dali_1.2.15] Merge branch 'devel/master' X-Git-Tag: submit/trunk/20181001.110911~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d949c5d33642952500927df924714b3c5790750d;hp=57d1b821320145a6c0e5e22c3759a62aaf70a5de;p=platform%2Fcore%2Fuifw%2Fdali-core.git [dali_1.2.15] Merge branch 'devel/master' Change-Id: Iac6ae38704a73651c26a6d9c4ff6ea954740377f --- diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h b/automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h index 10c3264..9bed832 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h @@ -956,10 +956,11 @@ public: inline void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { const std::string shaderSource = mShaderSources[shader]; - if( static_cast(shaderSource.length()) < bufsize ) + const int shaderSourceLength = static_cast(shaderSource.length()); + if( shaderSourceLength < bufsize ) { - strcpy(source, shaderSource.c_str()); - *length = shaderSource.length(); + strncpy( source, shaderSource.c_str(), shaderSourceLength ); + *length = shaderSourceLength; } else { diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-gl-sync-abstraction.h b/automated-tests/src/dali/dali-test-suite-utils/test-gl-sync-abstraction.h index 278bcd7..8ce96a4 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-gl-sync-abstraction.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-gl-sync-abstraction.h @@ -2,7 +2,7 @@ #define __TEST_GL_SYNC_ABSTRACTION_H__ /* - * 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. @@ -108,6 +108,10 @@ public: // TEST FUNCTIONS int GetNumberOfSyncObjects(); private: + + TestGlSyncAbstraction( const TestGlSyncAbstraction& ); ///< Undefined + TestGlSyncAbstraction& operator=( const TestGlSyncAbstraction& ); ///< Undefined + typedef std::vector SyncContainer; typedef SyncContainer::iterator SyncIter; SyncContainer mSyncObjects; ///< The sync objects diff --git a/automated-tests/src/dali/utc-Dali-Texture.cpp b/automated-tests/src/dali/utc-Dali-Texture.cpp index 93965de..8620381 100644 --- a/automated-tests/src/dali/utc-Dali-Texture.cpp +++ b/automated-tests/src/dali/utc-Dali-Texture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -466,6 +466,51 @@ int UtcDaliTextureUpload05(void) END_TEST; } +int UtcDaliTextureUpload06(void) +{ + TestApplication application; + + //Create the texture + unsigned int width(64); + unsigned int height(64); + tet_infoline( "Creating a Texure with an alpha channel" ); + Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height ); + + application.GetGlAbstraction().EnableTextureCallTrace(true); + + application.SendNotification(); + application.Render(); + + TraceCallStack& callStack = application.GetGlAbstraction().GetTextureTrace(); + + tet_infoline( "TexImage2D should be called with a null pointer to reserve storage for the texture in the gpu" ); + { + std::stringstream out; + out << GL_TEXTURE_2D <<", "<< 0u << ", " << width <<", "<< height; + DALI_TEST_CHECK( callStack.FindMethodAndParams("TexImage2D", out.str().c_str() ) ); + } + + tet_infoline( "Upload data to the texture" ); + callStack.Reset(); + + tet_infoline( "Creating a RGB pixel buffer and adding that to the texture to ensure it is handled correctly" ); + unsigned int bufferSize( width * height * 3 ); + unsigned char* buffer= reinterpret_cast( malloc( bufferSize ) ); + PixelData pixelData = PixelData::New( buffer, bufferSize, width, height, Pixel::RGB888, PixelData::FREE ); + texture.Upload( pixelData ); + application.SendNotification(); + application.Render(); + + tet_infoline( "TexImage2D should be called to upload the data" ); + { + std::stringstream out; + out << GL_TEXTURE_2D <<", "<< 0u << ", " << width <<", "<< height; + DALI_TEST_CHECK( callStack.FindMethodAndParams("TexImage2D", out.str().c_str() ) ); + } + + END_TEST; +} + int UtcDaliTextureUploadSmallerThanSize(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-TextureSet.cpp b/automated-tests/src/dali/utc-Dali-TextureSet.cpp index 334a2bf..cc20a6c 100644 --- a/automated-tests/src/dali/utc-Dali-TextureSet.cpp +++ b/automated-tests/src/dali/utc-Dali-TextureSet.cpp @@ -313,7 +313,7 @@ int UtcDaliTextureSetGetSampler(void) END_TEST; } -int UtcDaliTextureSetGetTextureCount(void) +int UtcDaliTextureGetTextureCount0(void) { TestApplication application; @@ -332,3 +332,23 @@ int UtcDaliTextureSetGetTextureCount(void) END_TEST; } + +int UtcDaliTextureGetTextureCount1(void) +{ + TestApplication application; + + TextureSet textureSet = CreateTextureSet(); + DALI_TEST_EQUALS( textureSet.GetTextureCount(), 0u, TEST_LOCATION ); + + Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 64, 64 ); + textureSet.SetTexture( 0u, texture ); + DALI_TEST_EQUALS( textureSet.GetTextureCount(), 1u, TEST_LOCATION ); + + textureSet.SetTexture( 1u, texture ); + DALI_TEST_EQUALS( textureSet.GetTextureCount(), 2u, TEST_LOCATION ); + + textureSet.SetSampler( 2u, Sampler::New() ); + DALI_TEST_EQUALS( textureSet.GetTextureCount(), 3u, TEST_LOCATION ); + + END_TEST; +} diff --git a/dali/devel-api/animation/animation-data.h b/dali/devel-api/animation/animation-data.h index c429149..ebdad5a 100644 --- a/dali/devel-api/animation/animation-data.h +++ b/dali/devel-api/animation/animation-data.h @@ -2,7 +2,7 @@ #define __DALI_ANIMATION_DATA_H__ /* - * Copyright (c) 2015 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. @@ -76,6 +76,7 @@ public: /** * @brief Adds one AnimationDataElement to the list to describe one animation. * @param[in] animationDataElement A pre-populated struct to add + * @note This class takes ownership of animationDataElement */ void Add( AnimationDataElement* animationDataElement ); diff --git a/dali/devel-api/images/distance-field.cpp b/dali/devel-api/images/distance-field.cpp index 134f9c4..bb4224a 100644 --- a/dali/devel-api/images/distance-field.cpp +++ b/dali/devel-api/images/distance-field.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -116,7 +116,7 @@ void DistanceTransform( float *source, float* dest, unsigned int length ) { ++rightmost; } - dest[i] = SQUARE( i - parabolas[rightmost] ) + source[parabolas[rightmost]]; + dest[i] = SQUARE( static_cast< int >( i ) - parabolas[rightmost] ) + source[parabolas[rightmost]]; } } diff --git a/dali/integration-api/file.list b/dali/integration-api/file.list index 79d4f95..a6032f4 100644 --- a/dali/integration-api/file.list +++ b/dali/integration-api/file.list @@ -3,7 +3,6 @@ platform_abstraction_src_files = \ $(platform_abstraction_src_dir)/bitmap.cpp \ $(platform_abstraction_src_dir)/core.cpp \ - $(platform_abstraction_src_dir)/image-data.cpp \ $(platform_abstraction_src_dir)/debug.cpp \ $(platform_abstraction_src_dir)/profiling.cpp \ $(platform_abstraction_src_dir)/input-options.cpp \ @@ -31,7 +30,6 @@ platform_abstraction_header_files = \ $(platform_abstraction_src_dir)/input-options.h \ $(platform_abstraction_src_dir)/bitmap.h \ $(platform_abstraction_src_dir)/resource-policies.h \ - $(platform_abstraction_src_dir)/image-data.h \ $(platform_abstraction_src_dir)/resource-types.h \ $(platform_abstraction_src_dir)/resource-request.h \ $(platform_abstraction_src_dir)/resource-cache.h \ diff --git a/dali/integration-api/image-data.cpp b/dali/integration-api/image-data.cpp deleted file mode 100644 index a0d772a..0000000 --- a/dali/integration-api/image-data.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// CLASS HEADER -#include - -// INTERNAL INCLUDES - -// EXTERNAL INCLUDES - -namespace Dali -{ - -namespace Integration -{ - -ImageData::ImageData( const size_t numBytes, const unsigned imageWidth, const unsigned imageHeight, const Pixel::Format pixelFormat ) : - mData( new uint8_t[numBytes] ), - dataSize( numBytes ), - imageWidth( imageWidth ), - imageHeight( imageHeight ), - pixelFormat( pixelFormat ), - mAlphaChannelUsed( ALPHA_USAGE_UNDETERMINED ) -{ - DALI_ASSERT_DEBUG( numBytes > 0U && imageWidth > 0U && imageHeight > 0U ); -} - -ImageData::ImageData( uint8_t * const imageBuffer, const size_t numBytes, const unsigned imageWidth, const unsigned imageHeight, const Pixel::Format pixelFormat ) : - mData( imageBuffer ), - dataSize( numBytes ), - imageWidth( imageWidth ), - imageHeight( imageHeight ), - pixelFormat( pixelFormat ), - mAlphaChannelUsed( ALPHA_USAGE_UNDETERMINED ) -{ - DALI_ASSERT_DEBUG( imageBuffer != 0 && numBytes > 0U && imageWidth > 0U && imageHeight > 0U ); -} - -ImageData::~ImageData() -{ - delete[] mData; -} - -ImageDataPtr ImageData::New( const BufferSize numBytes, unsigned imageWidth, unsigned imageHeight, Pixel::Format pixelFormat ) -{ - DALI_ASSERT_DEBUG( numBytes.bufferSize > 0 && "Zero allocations are pointless if also harmless." ); - DALI_ASSERT_DEBUG( imageWidth > 0 && imageHeight > 0 && "Zero dimensioned images are pointless if also harmless." ); - return ImageDataPtr( new ImageData( numBytes, imageWidth, imageHeight, pixelFormat ) ); -} - -ImageDataPtr ImageData::New( uint8_t * const imageBuffer, const BufferSize numBytes, unsigned imageWidth, unsigned imageHeight, Pixel::Format pixelFormat ) -{ - DALI_ASSERT_DEBUG( numBytes.bufferSize > 0 && "Zero-length buffers are pointless if also harmless." ); - DALI_ASSERT_DEBUG( imageWidth > 0 && imageHeight > 0 && "Zero dimensioned images are pointless if also harmless." ); - return ImageDataPtr( new ImageData( imageBuffer, numBytes, imageWidth, imageHeight, pixelFormat ) ); -} - -ImageDataPtr NewBitmapImageData( unsigned imageWidth, unsigned imageHeight, Pixel::Format pixelFormat ) -{ - DALI_ASSERT_DEBUG( pixelFormat <= Pixel::BGRA8888 && "Pixel format must be an addressable one." ); - const size_t numBytes = imageWidth * imageHeight * Pixel::GetBytesPerPixel( pixelFormat ); - - return ImageData::New( BufferSize(numBytes), imageWidth, imageHeight, pixelFormat ); -} - -} //namespace Integration - -} //namespace Dali - diff --git a/dali/integration-api/image-data.h b/dali/integration-api/image-data.h deleted file mode 100644 index 58c9d80..0000000 --- a/dali/integration-api/image-data.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __DALI_INTEGRATION_IMAGE_DATA_H__ -#define __DALI_INTEGRATION_IMAGE_DATA_H__ - -/* - * Copyright (c) 2014 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// INTERNAL INCLUDES -#include // For DALI_LOG_OBJECT_STRING_DECLARATION -#include -#include -#include - -// EXTERNAL INCLUDES -#include - -namespace Dali -{ - -namespace Integration -{ - -class ImageData; -typedef IntrusivePtr ImageDataPtr; - -typedef uint8_t PixelBuffer; - -/** - * Used to avoid accidentally mixing the order of parameters where some are uint - * dimensions and one is a buffer size. - **/ -class BufferSize -{ -public: - explicit BufferSize(size_t size) : bufferSize( size ) - { } - operator size_t() const { return bufferSize; } - const size_t bufferSize; -}; - -/** - * @brief A simple container for image data. - * - * Just a pointer to a buffer and some minimal metadata. It always owns the - * buffer of image data that it points to until it is destroyed or the buffer - * is released with ReleaseImageBuffer(). - * - * The width and height stored are the logical image values. Compressed formats - * such as ETC group pixels into blocks (ETC = 4*4) and these logical width and - * height may indicate, for example for ETC, that 1 to 3 pixels in the rightmost - * column of blocks or bottom row are ignored for rendering. - * For simple uncompressed images, the buffer is exactly width * height * - * bytes-per-pixel in size with no spare bytes at right or bottom edge. - */ -class DALI_IMPORT_API ImageData : public Dali::RefObject -{ -public: - /** - * @brief Three values for the information about the alpha values in the - * pixels. - * - * Alpha in pixels with the channel can be undetermined, it can be all-ones, - * or it can have at least one pixel that is translucent with an alpha < 1.0. - **/ - enum AlphaUsage - { - /** Alpha not yet been tested.*/ - ALPHA_USAGE_UNDETERMINED, - /** Alpha == 1.0 in every pixel.*/ - ALPHA_USAGE_ALL_OPAQUE, - /** Alpha < 1.0 in at least one pixel.*/ - ALPHA_USAGE_SOME_TRANSLUCENT - }; - -private: - - /** - * Construct an instance and allocate a buffer owned by it. - * @param[in] numBytes The number of bytes to allocate to hold the image data. - * @param[in] imageWidth The width in pixels of the image. - * @param[in] imageHeight The height in pixels of the image. - * @param[in] pixelFormat The format of the image data in the buffer. - */ - ImageData( const size_t numBytes, const unsigned imageWidth, const unsigned imageHeight, const Pixel::Format pixelFormat ); - - /** - * Construct an instance and have it take ownership of the buffer passed in. - * @param[in] imageBuffer A buffer of pixel data that should have been allocated using new uint8_t[]. - * @param[in] numBytes The number of bytes in the buffer pointed to by imageBuffer. - * @param[in] imageWidth The width in pixels of the image. - * @param[in] imageHeight The height in pixels of the image. - * @param[in] pixelFormat The format of the image data in the buffer. - */ - ImageData( uint8_t * const imageBuffer, const size_t numBytes, const unsigned imageWidth, const unsigned imageHeight, const Pixel::Format pixelFormat ); - - ~ImageData(); - -public: - - /** Allocate and initialize a fresh ImageData object pointing at a new buffer, - * returning a smart pointer owning it. - * @note Clients can alternatively use the helper function NewBitmapImageData() to - * calculate the buffer size from other parameters if the image data represents - * a bitmap (a 2d grid of addressable pixels). - * @param[in] numBytes The number of bytes to allocate to hold the image data. - * @param[in] imageWidth The width in pixels of the image. - * @param[in] imageHeight The height in pixels of the image. - * @param[in] pixelFormat The format of the image data in the buffer. - **/ - static ImageDataPtr New( const BufferSize numBytes, unsigned imageWidth, unsigned imageHeight, Pixel::Format pixelFormat ); - - /** Allocate and initialise a fresh ImageData object, taking ownership of the - * buffer passed in. - * @param[in] imageBuffer A block of memory allocated with - * new uint8_t[]. This is owned by the new ImageData instance - * on successful return and should be forgotten by the caller. - * @param[in] numBytes The number of bytes in the buffer pointed to by imageBuffer. - * @param[in] imageWidth The width in pixels of the image. - * @param[in] imageHeight The height in pixels of the image. - * @param[in] pixelFormat The format of the image data in the buffer. - **/ - static ImageDataPtr New( uint8_t * const imageBuffer, const BufferSize numBytes, unsigned imageWidth, unsigned imageHeight, Pixel::Format pixelFormat ); - - /** Access the buffer of image data. */ - const uint8_t * GetBuffer() const { return mData; } - - /** Access the buffer of image data. */ - uint8_t * GetBuffer() { return mData; } - - /** - * Pass ownership of the buffer of pixel-level data that this instance - * currently owns to the caller, and forget about the buffer here as a - * side effect. - * @returns A pointer to the underlying buffer of pixel-level image data. - * The caller takes ownership of the buffer and is responsible for calling - * delete[] on it eventually. - **/ - uint8_t * ReleaseImageBuffer() { uint8_t * const data = mData; mData = 0; return data; } - - /** - * @brief Get whether the alpha channel in the pixels is used. - */ - AlphaUsage GetAlphaUsage() const { return mAlphaChannelUsed; } - - /** - * @brief Set whether the alpha channel in the pixels is used. - */ - void SetAlphaUsed( const bool alphaUsed ) { mAlphaChannelUsed = alphaUsed ? ALPHA_USAGE_SOME_TRANSLUCENT : ALPHA_USAGE_ALL_OPAQUE; } - -private: - - ImageData(const ImageData& other); ///< defined private to prevent use - ImageData& operator = (const ImageData& other); ///< defined private to prevent use - - /** Pointer to the buffer of image data. */ - uint8_t* mData; - -public: - const size_t dataSize; ///< Number of bytes in buffer pointed at by mData - const uint16_t imageWidth; ///< Image logical width in pixels - const uint16_t imageHeight; ///< Image logical height in pixels - const Pixel::Format pixelFormat; ///< Pixel format - -private: - AlphaUsage mAlphaChannelUsed; - - // Changes scope, should be at end of class - DALI_LOG_OBJECT_STRING_DECLARATION; -}; - -/** - * A convenience function for creating the common case of an uncompressed image - * having width * height pixels in the buffer. - * @param[in] imageWidth The width in pixels of the image. - * @param[in] imageHeight The height in pixels of the image. - * @param[in] pixelFormat The format of the image data in the buffer. - */ -DALI_IMPORT_API ImageDataPtr NewBitmapImageData( unsigned imageWidth, unsigned imageHeight, Pixel::Format pixelFormat ); - -} // namespace Integration - -} // namespace Dali - -#endif // __DALI_INTEGRATION_IMAGE_DATA_H__ diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index 485ec51..b3fce27 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1386,6 +1386,8 @@ void Actor::SetRelayoutEnabled( bool relayoutEnabled ) { EnsureRelayoutData(); + DALI_ASSERT_DEBUG( mRelayoutData && "mRelayoutData not created" ); + mRelayoutData->relayoutEnabled = relayoutEnabled; } } @@ -1915,7 +1917,7 @@ Dali::Actor::OnRelayoutSignalType& Actor::OnRelayoutSignal() bool Actor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - Actor* actor = dynamic_cast< Actor* >( object ); + Actor* actor = static_cast< Actor* >( object ); // TypeRegistry guarantees that this is the correct type. if( 0 == signalName.compare( SIGNAL_TOUCHED ) ) { diff --git a/dali/internal/event/animation/animation-impl.cpp b/dali/internal/event/animation/animation-impl.cpp index ec49265..5a8ca0c 100644 --- a/dali/internal/event/animation/animation-impl.cpp +++ b/dali/internal/event/animation/animation-impl.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -791,7 +791,7 @@ void Animation::EmitSignalFinish() bool Animation::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - Animation* animation = dynamic_cast(object); + Animation* animation = static_cast< Animation* >(object); // TypeRegistry guarantees that this is the correct type. if( 0 == signalName.compare( SIGNAL_FINISHED ) ) { diff --git a/dali/internal/event/animation/key-frames-impl.h b/dali/internal/event/animation/key-frames-impl.h index c593b0b..433d2bc 100644 --- a/dali/internal/event/animation/key-frames-impl.h +++ b/dali/internal/event/animation/key-frames-impl.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_KEY_FRAMES_H__ /* - * 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. @@ -172,7 +172,7 @@ protected: KeyFrameBaseSpec& operator=( const KeyFrameBaseSpec& keyFrames ) { - if( *this != keyFrames ) + if( this != &keyFrames ) { mPVs.clear(); mPVs = keyFrames.mPVs; diff --git a/dali/internal/event/animation/property-input-accessor.h b/dali/internal/event/animation/property-input-accessor.h index 9c203a1..aca460b 100644 --- a/dali/internal/event/animation/property-input-accessor.h +++ b/dali/internal/event/animation/property-input-accessor.h @@ -2,7 +2,7 @@ #define __DALI_PROPERTY_INPUT_ACCESSOR_H__ /* - * Copyright (c) 2015 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. @@ -64,8 +64,11 @@ public: */ PropertyInputAccessor& operator=(const PropertyInputAccessor& accessor) { - mInput = accessor.mInput; - mComponentIndex = accessor.mComponentIndex; + if( this != &accessor ) + { + mInput = accessor.mInput; + mComponentIndex = accessor.mComponentIndex; + } return *this; } diff --git a/dali/internal/event/animation/property-input-indexer.h b/dali/internal/event/animation/property-input-indexer.h index c19bf14..94a03e6 100644 --- a/dali/internal/event/animation/property-input-indexer.h +++ b/dali/internal/event/animation/property-input-indexer.h @@ -2,7 +2,7 @@ #define __DALI_PROPERTY_INPUT_INDEXER_H__ /* - * 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. @@ -61,8 +61,11 @@ public: */ PropertyInputIndexer& operator=( const PropertyInputIndexer& other ) { - mBufferIndex = other.mBufferIndex; - mInput = other.mInput; + if( this != &other ) + { + mBufferIndex = other.mBufferIndex; + mInput = other.mInput; + } return *this; } diff --git a/dali/internal/event/common/object-registry-impl.cpp b/dali/internal/event/common/object-registry-impl.cpp index 76c2cbe..f2ca897 100644 --- a/dali/internal/event/common/object-registry-impl.cpp +++ b/dali/internal/event/common/object-registry-impl.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -78,7 +78,7 @@ void ObjectRegistry::UnregisterObject( Dali::BaseObject* object ) bool ObjectRegistry::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - ObjectRegistry* objectRegistry = dynamic_cast( object ); + ObjectRegistry* objectRegistry = static_cast< ObjectRegistry* >( object ); // TypeRegistry guarantees that this is the correct type. if( 0 == strcmp( signalName.c_str(), SIGNAL_OBJECT_CREATED ) ) { diff --git a/dali/internal/event/common/stage-impl.cpp b/dali/internal/event/common/stage-impl.cpp index bbdf7b0..a9abac8 100644 --- a/dali/internal/event/common/stage-impl.cpp +++ b/dali/internal/event/common/stage-impl.cpp @@ -520,7 +520,7 @@ void Stage::KeepRendering( float durationSeconds ) bool Stage::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - Stage* stage = dynamic_cast(object); + Stage* stage = static_cast< Stage* >(object); // TypeRegistry guarantees that this is the correct type. if( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_EVENT ) ) { diff --git a/dali/internal/event/events/long-press-gesture-detector-impl.cpp b/dali/internal/event/events/long-press-gesture-detector-impl.cpp index 441ba62..804e8d4 100644 --- a/dali/internal/event/events/long-press-gesture-detector-impl.cpp +++ b/dali/internal/event/events/long-press-gesture-detector-impl.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -143,7 +143,7 @@ void LongPressGestureDetector::EmitLongPressGestureSignal(Dali::Actor pressedAct bool LongPressGestureDetector::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - LongPressGestureDetector* gesture = dynamic_cast(object); + LongPressGestureDetector* gesture = static_cast< LongPressGestureDetector* >(object); // TypeRegistry guarantees that this is the correct type. if ( 0 == strcmp( signalName.c_str(), SIGNAL_LONG_PRESS_DETECTED ) ) { diff --git a/dali/internal/event/events/pan-gesture-detector-impl.cpp b/dali/internal/event/events/pan-gesture-detector-impl.cpp index c819a82..a66e15f 100644 --- a/dali/internal/event/events/pan-gesture-detector-impl.cpp +++ b/dali/internal/event/events/pan-gesture-detector-impl.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -291,7 +291,7 @@ void PanGestureDetector::SetSceneObject( const SceneGraph::PanGesture* object ) bool PanGestureDetector::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - PanGestureDetector* gesture = dynamic_cast(object); + PanGestureDetector* gesture = static_cast< PanGestureDetector* >(object); // TypeRegistry guarantees that this is the correct type. if ( 0 == strcmp( signalName.c_str(), SIGNAL_PAN_DETECTED ) ) { diff --git a/dali/internal/event/events/pinch-gesture-detector-impl.cpp b/dali/internal/event/events/pinch-gesture-detector-impl.cpp index aa717aa..e2b49ab 100644 --- a/dali/internal/event/events/pinch-gesture-detector-impl.cpp +++ b/dali/internal/event/events/pinch-gesture-detector-impl.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -77,7 +77,7 @@ void PinchGestureDetector::EmitPinchGestureSignal(Dali::Actor actor, const Pinch bool PinchGestureDetector::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - PinchGestureDetector* gesture = dynamic_cast(object); + PinchGestureDetector* gesture = static_cast< PinchGestureDetector* >(object); // TypeRegistry guarantees that this is the correct type. if ( 0 == strcmp( signalName.c_str(), SIGNAL_PINCH_DETECTED ) ) { diff --git a/dali/internal/event/events/tap-gesture-detector-impl.cpp b/dali/internal/event/events/tap-gesture-detector-impl.cpp index 7df665b..7f65842 100644 --- a/dali/internal/event/events/tap-gesture-detector-impl.cpp +++ b/dali/internal/event/events/tap-gesture-detector-impl.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -148,7 +148,7 @@ void TapGestureDetector::EmitTapGestureSignal(Dali::Actor tappedActor, const Tap bool TapGestureDetector::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - TapGestureDetector* gesture = dynamic_cast(object); + TapGestureDetector* gesture = static_cast< TapGestureDetector* >(object); // TypeRegistry guarantees that this is the correct type. if ( 0 == strcmp( signalName.c_str(), SIGNAL_TAP_DETECTED ) ) { diff --git a/dali/internal/event/images/bitmap-packed-pixel.h b/dali/internal/event/images/bitmap-packed-pixel.h index 5708a87..c6ca538 100644 --- a/dali/internal/event/images/bitmap-packed-pixel.h +++ b/dali/internal/event/images/bitmap-packed-pixel.h @@ -116,7 +116,7 @@ public: // unsigned int GetBufferSize() const virtual size_t GetBufferSize() const { - return mBufferWidth*mBytesPerPixel*mBufferHeight; + return static_cast< size_t >( mBufferWidth ) * mBytesPerPixel * mBufferHeight; // need to cast to size_t to avoid possibility of overflow } /** @@ -124,9 +124,6 @@ public: * @return The buffer stride (in bytes). */ virtual unsigned int GetBufferStride() const; - //{ - // return mBufferWidth*mBytesPerPixel; - //} /** * Get the pixel format diff --git a/dali/internal/event/render-tasks/render-task-impl.cpp b/dali/internal/event/render-tasks/render-task-impl.cpp index 09514c9..a1ad2b8 100644 --- a/dali/internal/event/render-tasks/render-task-impl.cpp +++ b/dali/internal/event/render-tasks/render-task-impl.cpp @@ -789,7 +789,7 @@ Dali::RenderTask::RenderTaskSignalType& RenderTask::FinishedSignal() bool RenderTask::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) { bool connected( true ); - RenderTask* renderTask = dynamic_cast(object); + RenderTask* renderTask = static_cast< RenderTask* >(object); // TypeRegistry guarantees that this is the correct type. if ( 0 == strcmp( signalName.c_str(), SIGNAL_FINISHED ) ) { diff --git a/dali/internal/event/rendering/texture-set-impl.cpp b/dali/internal/event/rendering/texture-set-impl.cpp index 110eece..428ab9e 100644 --- a/dali/internal/event/rendering/texture-set-impl.cpp +++ b/dali/internal/event/rendering/texture-set-impl.cpp @@ -184,7 +184,7 @@ Sampler* TextureSet::GetSampler( size_t index ) const size_t TextureSet::GetTextureCount() const { - return mImages.size(); + return mSamplers.size(); } const SceneGraph::TextureSet* TextureSet::GetTextureSetSceneObject() const diff --git a/dali/internal/event/resources/resource-client.h b/dali/internal/event/resources/resource-client.h index 1de28df..7c10b7e 100644 --- a/dali/internal/event/resources/resource-client.h +++ b/dali/internal/event/resources/resource-client.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_RESOURCE_CLIENT_H__ /* - * 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. @@ -265,6 +265,10 @@ public: // Message methods void UpdateImageTicket( ResourceId id, const ImageAttributes& imageAttributes ); ///!< Issue #AHC01 private: + + ResourceClient( const ResourceClient& ); ///< Undefined + ResourceClient& operator=( const ResourceClient& ); ///< Undefined + ResourceManager& mResourceManager; ///< The resource manager EventThreadServices& mEventThreadServices; ///< Interface to send messages through diff --git a/dali/internal/render/renderers/render-renderer.cpp b/dali/internal/render/renderers/render-renderer.cpp index 2a15906..42d748a 100644 --- a/dali/internal/render/renderers/render-renderer.cpp +++ b/dali/internal/render/renderers/render-renderer.cpp @@ -176,6 +176,16 @@ void Renderer::SetRenderDataProvider( SceneGraph::RenderDataProvider* dataProvid { mRenderDataProvider = dataProvider; mUpdateAttributesLocation = true; + + //Check that the number of textures match the number of samplers in the shader + size_t textureCount = dataProvider->GetTextures().size() + dataProvider->GetNewTextures().size(); + Program* program = dataProvider->GetShader().GetProgram(); + if( program && program->GetActiveSamplerCount() != textureCount ) + { + DALI_LOG_ERROR("The number of active samplers in the shader(%lu) does not match the number of textures in the TextureSet(%lu)\n", + program->GetActiveSamplerCount(), + textureCount ); + } } void Renderer::SetGeometry( Render::Geometry* geometry ) diff --git a/dali/internal/render/renderers/render-texture.cpp b/dali/internal/render/renderers/render-texture.cpp index 8ca2647..36df6f5 100644 --- a/dali/internal/render/renderers/render-texture.cpp +++ b/dali/internal/render/renderers/render-texture.cpp @@ -730,7 +730,7 @@ void NewTexture::Upload( Context& context, PixelDataPtr pixelData, const Interna if( pixelDataFormat == GL_RGB && mInternalFormat == GL_RGBA ) { //Convert manually from RGB to RGBA if GLES < 3 ( GLES 3 can do the conversion automatically when uploading ) - size_t dataSize = params.width * params.height; + size_t dataSize = static_cast< size_t >( params.width ) * params.height; tempBuffer = new unsigned char[dataSize*4u]; for( size_t i(0u); iLoad(); cache.AddProgram( shaderHash, program ); } @@ -121,11 +120,6 @@ Program* Program::New( ProgramCache& cache, Internal::ShaderDataPtr shaderData, void Program::Use() { - if ( !mLinked ) - { - Load(); - } - if ( mLinked ) { if ( this != mCache.GetCurrentProgram() ) diff --git a/dali/internal/render/shaders/program.h b/dali/internal/render/shaders/program.h index b818508..0d5f416 100644 --- a/dali/internal/render/shaders/program.h +++ b/dali/internal/render/shaders/program.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_PROGRAM_H__ /* - * 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. @@ -324,10 +324,9 @@ public: private: - // default constructor, not defined - Program(); - // assignment operator, not defined - Program& operator=( const Program& ); + Program(); ///< default constructor, not defined + Program( const Program& ); ///< copy constructor, not defined + Program& operator=( const Program& ); ///< assignment operator, not defined /** * Load the shader, from a precompiled binary if available, else from source code diff --git a/dali/internal/update/common/discard-queue.cpp b/dali/internal/update/common/discard-queue.cpp index e89c964..d1e4eed 100644 --- a/dali/internal/update/common/discard-queue.cpp +++ b/dali/internal/update/common/discard-queue.cpp @@ -38,7 +38,12 @@ namespace SceneGraph { DiscardQueue::DiscardQueue( RenderQueue& renderQueue ) -: mRenderQueue( renderQueue ) +: mRenderQueue( renderQueue ), + mNodeQueue(), + mShaderQueue(), + mRendererQueue(), + mCameraQueue(), + mGeometryBatcher( NULL ) { } diff --git a/dali/internal/update/common/scene-graph-property-notification.cpp b/dali/internal/update/common/scene-graph-property-notification.cpp index 012b537..82464fc 100644 --- a/dali/internal/update/common/scene-graph-property-notification.cpp +++ b/dali/internal/update/common/scene-graph-property-notification.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -60,7 +60,8 @@ PropertyNotification::PropertyNotification(Object& object, mConditionType(condition), mArguments(arguments), mValid(false), - mNotifyMode( Dali::PropertyNotification::Disabled ) + mNotifyMode( Dali::PropertyNotification::Disabled ), + mConditionFunction(NULL) { SetNotifyMode(notifyMode); diff --git a/dali/internal/update/gestures/scene-graph-pan-gesture.h b/dali/internal/update/gestures/scene-graph-pan-gesture.h index 0185f72..c511f7c 100644 --- a/dali/internal/update/gestures/scene-graph-pan-gesture.h +++ b/dali/internal/update/gestures/scene-graph-pan-gesture.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_SCENE_GRAPH_PAN_GESTURE_H__ /* - * 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. @@ -93,9 +93,12 @@ public: */ Info& operator=( const Info& rhs ) { - velocity = rhs.velocity; - displacement = rhs.displacement; - position = rhs.position; + if( this != &rhs ) + { + velocity = rhs.velocity; + displacement = rhs.displacement; + position = rhs.position; + } return *this; } @@ -134,10 +137,13 @@ public: */ PanInfo& operator=( const PanInfo& rhs ) { - time = rhs.time; - state = rhs.state; - local = rhs.local; - screen = rhs.screen; + if( this != &rhs ) + { + time = rhs.time; + state = rhs.state; + local = rhs.local; + screen = rhs.screen; + } return *this; } diff --git a/dali/internal/update/manager/geometry-batcher.cpp b/dali/internal/update/manager/geometry-batcher.cpp index 58a9dbb..2409c95 100644 --- a/dali/internal/update/manager/geometry-batcher.cpp +++ b/dali/internal/update/manager/geometry-batcher.cpp @@ -189,9 +189,12 @@ struct BatchParent struct Impl { - Impl() : + Impl() + : batchParents(), + updateManager( NULL ), currentFrame( 0 ) - {} + { + } int GetBatchKeyIndex( size_t batchParentIndex, const BatchKey& key ) { diff --git a/dali/internal/update/manager/geometry-batcher.h b/dali/internal/update/manager/geometry-batcher.h index c19e034..069ac85 100644 --- a/dali/internal/update/manager/geometry-batcher.h +++ b/dali/internal/update/manager/geometry-batcher.h @@ -121,6 +121,9 @@ public: private: + GeometryBatcher( const GeometryBatcher& ); ///< Undefined + GeometryBatcher& operator=( const GeometryBatcher& ); ///< Undefined + /** * @brief Clones vertex format of source geometry and stores generated data in the batchInfo object * @param[in] sourceGeometry Geometry of the very first batched item diff --git a/dali/internal/update/manager/update-manager.cpp b/dali/internal/update/manager/update-manager.cpp index 28a309f..dbe3c0e 100644 --- a/dali/internal/update/manager/update-manager.cpp +++ b/dali/internal/update/manager/update-manager.cpp @@ -273,6 +273,11 @@ struct UpdateManager::Impl GestureContainer gestures; ///< A container of owned gesture detectors bool renderTaskWaiting; ///< A REFRESH_ONCE render task is waiting to be rendered + +private: + + Impl( const Impl& ); ///< Undefined + Impl& operator=( const Impl& ); ///< Undefined }; UpdateManager::UpdateManager( NotificationManager& notificationManager, diff --git a/dali/internal/update/rendering/scene-graph-renderer.cpp b/dali/internal/update/rendering/scene-graph-renderer.cpp index 331a93d..f76b183 100644 --- a/dali/internal/update/rendering/scene-graph-renderer.cpp +++ b/dali/internal/update/rendering/scene-graph-renderer.cpp @@ -586,16 +586,6 @@ RenderDataProvider* Renderer::NewRenderDataProvider() if( mTextureSet ) { size_t textureCount = mTextureSet->GetTextureCount(); - size_t newTextureCount = mTextureSet->GetNewTextureCount(); - - Program* program = mShader->GetProgram(); - if( program && program->GetActiveSamplerCount() != textureCount + newTextureCount ) - { - DALI_LOG_ERROR("The number of active samplers in the shader(%lu) does not match the number of textures in the TextureSet(%lu)\n", - program->GetActiveSamplerCount(), - textureCount + newTextureCount ); - } - dataProvider->mTextures.resize( textureCount ); dataProvider->mSamplers.resize( textureCount ); for( unsigned int i(0); imSamplers[i] = mTextureSet->GetTextureSampler(i); } - dataProvider->mNewTextures.resize( newTextureCount ); - dataProvider->mSamplers.resize( newTextureCount ); - for( unsigned int i(0); iGetNewTextureCount(); + dataProvider->mNewTextures.resize( textureCount ); + dataProvider->mSamplers.resize( textureCount ); + for( unsigned int i(0); imNewTextures[i] = mTextureSet->GetNewTexture(i); dataProvider->mSamplers[i] = mTextureSet->GetTextureSampler(i); diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index 4816442..bdf8180 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const unsigned int CORE_MAJOR_VERSION = 1; const unsigned int CORE_MINOR_VERSION = 2; -const unsigned int CORE_MICRO_VERSION = 14; +const unsigned int CORE_MICRO_VERSION = 15; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifndef EMSCRIPTEN diff --git a/dali/public-api/events/gesture.cpp b/dali/public-api/events/gesture.cpp index 31c3b25..0ceaadf 100644 --- a/dali/public-api/events/gesture.cpp +++ b/dali/public-api/events/gesture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -30,9 +30,12 @@ Gesture::Gesture( const Gesture& rhs ) Gesture& Gesture::operator=( const Gesture& rhs ) { - type = rhs.type; - state = rhs.state; - time = rhs.time; + if( this != &rhs ) + { + type = rhs.type; + state = rhs.state; + time = rhs.time; + } return *this; } diff --git a/dali/public-api/events/long-press-gesture.cpp b/dali/public-api/events/long-press-gesture.cpp index b9dd141..e329c82 100644 --- a/dali/public-api/events/long-press-gesture.cpp +++ b/dali/public-api/events/long-press-gesture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -37,10 +37,13 @@ LongPressGesture::LongPressGesture( const LongPressGesture& rhs ) LongPressGesture& LongPressGesture::operator=( const LongPressGesture& rhs ) { - Gesture::operator=(rhs); - numberOfTouches = rhs.numberOfTouches; - screenPoint = rhs.screenPoint; - localPoint = rhs.localPoint; + if( this != &rhs ) + { + Gesture::operator=(rhs); + numberOfTouches = rhs.numberOfTouches; + screenPoint = rhs.screenPoint; + localPoint = rhs.localPoint; + } return *this; } diff --git a/dali/public-api/events/pan-gesture.cpp b/dali/public-api/events/pan-gesture.cpp index f6011ad..a2a8f44 100644 --- a/dali/public-api/events/pan-gesture.cpp +++ b/dali/public-api/events/pan-gesture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -50,14 +50,17 @@ PanGesture::PanGesture( const PanGesture& rhs ) PanGesture& PanGesture::operator=( const PanGesture& rhs ) { - Gesture::operator=(rhs); - velocity = rhs.velocity; - displacement = rhs.displacement; - position = rhs.position; - screenVelocity = rhs.screenVelocity; - screenDisplacement = rhs.screenDisplacement; - screenPosition = rhs.screenPosition; - numberOfTouches = rhs.numberOfTouches; + if( this != &rhs ) + { + Gesture::operator=(rhs); + velocity = rhs.velocity; + displacement = rhs.displacement; + position = rhs.position; + screenVelocity = rhs.screenVelocity; + screenDisplacement = rhs.screenDisplacement; + screenPosition = rhs.screenPosition; + numberOfTouches = rhs.numberOfTouches; + } return *this; } diff --git a/dali/public-api/events/pinch-gesture.cpp b/dali/public-api/events/pinch-gesture.cpp index d074efe..9c72c25 100644 --- a/dali/public-api/events/pinch-gesture.cpp +++ b/dali/public-api/events/pinch-gesture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -42,11 +42,14 @@ PinchGesture::PinchGesture( const PinchGesture& rhs ) PinchGesture& PinchGesture::operator=( const PinchGesture& rhs ) { - Gesture::operator=(rhs); - scale = rhs.scale; - speed = rhs.speed; - screenCenterPoint = rhs.screenCenterPoint; - localCenterPoint = rhs.localCenterPoint; + if( this != &rhs ) + { + Gesture::operator=(rhs); + scale = rhs.scale; + speed = rhs.speed; + screenCenterPoint = rhs.screenCenterPoint; + localCenterPoint = rhs.localCenterPoint; + } return *this; } diff --git a/dali/public-api/events/tap-gesture.cpp b/dali/public-api/events/tap-gesture.cpp index 3d9fed6..d20afc4 100644 --- a/dali/public-api/events/tap-gesture.cpp +++ b/dali/public-api/events/tap-gesture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -39,11 +39,14 @@ TapGesture::TapGesture( const TapGesture& rhs ) TapGesture& TapGesture::operator=( const TapGesture& rhs ) { - Gesture::operator=(rhs); - numberOfTaps = rhs.numberOfTaps; - numberOfTouches = rhs.numberOfTouches; - screenPoint = rhs.screenPoint; - localPoint = rhs.localPoint; + if( this != &rhs ) + { + Gesture::operator=(rhs); + numberOfTaps = rhs.numberOfTaps; + numberOfTouches = rhs.numberOfTouches; + screenPoint = rhs.screenPoint; + localPoint = rhs.localPoint; + } return *this; } diff --git a/dali/public-api/object/property-value.cpp b/dali/public-api/object/property-value.cpp index ffd0f70..d2d3e66 100644 --- a/dali/public-api/object/property-value.cpp +++ b/dali/public-api/object/property-value.cpp @@ -222,6 +222,11 @@ public: // Data Property::Array* arrayValue; Property::Map* mapValue; }; + +private: + + Impl( const Impl& ); ///< Undefined + Impl& operator=( const Impl& ); ///< Undefined }; Property::Value::Value() @@ -313,6 +318,7 @@ Property::Value::Value( Property::Map& mapValue ) } Property::Value::Value( Type type ) +: mImpl( NULL ) { switch (type) { diff --git a/packaging/dali.spec b/packaging/dali.spec index 6bc64c2..1d3f285 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: The OpenGLES Canvas Core Library -Version: 1.2.14 +Version: 1.2.15 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-2-Clause and MIT