DALI_CFLAGS=-DPLATFORM_TIZEN
# Use C++ 11
-DALI_CFLAGS="$DALI_CFLAGS -std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual"
+DALI_CFLAGS="$DALI_CFLAGS -std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast"
AC_ARG_ENABLE(exportall,
[AC_HELP_STRING([--enable-exportall],
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
{
for ( int x = 0; x < paddedWidth; ++x)
{
- if( y < (int)fieldBorder || y >= (paddedHeight - (int)fieldBorder) ||
- x < (int)fieldBorder || x >= (paddedWidth - (int)fieldBorder) )
+ if( y < static_cast< int >( fieldBorder ) || y >= ( paddedHeight - static_cast< int >( fieldBorder ) ) ||
+ x < static_cast< int >( fieldBorder ) || x >= ( paddedWidth - static_cast< int >( fieldBorder ) ) )
{
outside[ y * paddedWidth + x ] = MAX_DISTANCE;
inside[ y * paddedWidth + x ] = 0.0f;
template< typename T >
const char * GetLinearEnumerationName( T value, const StringEnum* table, unsigned int tableCount )
{
- if ( table && ( value > 0 || value <= (int)tableCount ) )
+ if ( table && ( value > 0 || value <= static_cast<int>( tableCount ) ) )
{
return table[value].string;
}
$(platform_abstraction_src_dir)/bitmap.h \
$(platform_abstraction_src_dir)/resource-policies.h \
$(platform_abstraction_src_dir)/resource-types.h \
- $(platform_abstraction_src_dir)/resource-declarations.h \
$(platform_abstraction_src_dir)/gl-abstraction.h \
$(platform_abstraction_src_dir)/gl-defines.h \
$(platform_abstraction_src_dir)/gl-sync-abstraction.h \
namespace Integration
{
-
+typedef unsigned int ResourceId;
typedef IntrusivePtr<Dali::RefObject> ResourcePointer;
/**
+++ /dev/null
-#ifndef __DALI_INTEGRATION_RESOURCE_DECLARATIONS_H__
-#define __DALI_INTEGRATION_RESOURCE_DECLARATIONS_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.
- *
- */
-
-namespace Dali
-{
-
-namespace Integration
-{
-
-/**
- * @brief Used to identify a resource loading operation.
- *
- * These unique ResourceId values can be used to identify a resource loading
- * transaction in core-adaptor communication.
- * A resource transaction is asynchronous and many can be in-flight
- * concurrently.
- * A ResourceId allows the core to track a resource transaction over its
- * lifetime and match an asynchronous completion notification to the
- * corresponding load request or to cancel the operation early.
- *
- * A resource transaction begins with a call to PlatformAbstraction::LoadResource()
- * Later asynchronous status notifications obtained by polling
- * PlatformAbstraction::GetResources() can be mapped to corresponding
- * LoadResource() invocations using the ResourceId value.
- * It is the core's responsibility to ensure that each invocation of
- * PlatformAbstraction::LoadResource() passes in a Request object with a unique
- * integer ResourceId.
- *
- * @sa Dali::Integration::PlatformAbstraction::LoadResource
- * Dali::Integration::PlatformAbstraction::GetResources
- * Dali::Integration::ResourceCache
- */
-typedef unsigned int ResourceId;
-const ResourceId InvalidResourceId = (ResourceId)-1;
-
-/**
- * Used to inform the current loading status
- */
-enum LoadStatus
-{
- RESOURCE_LOADING, ///< There are missing resources, being loaded
- RESOURCE_PARTIALLY_LOADED, ///< Enough resource has been loaded to start low quality rendering
- RESOURCE_COMPLETELY_LOADED, ///< The resource has been completely loaded
-};
-
-} // namespace Integration
-
-} // namespace Dali
-
-#endif // __DALI_INTEGRATION_RESOURCE_DECLARATIONS_H__
#define __DALI_INTEGRATION_RESOURCE_TYPES_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
#include <dali/public-api/images/image-operations.h>
#include <dali/public-api/math/uint-16-pair.h>
#include <dali/public-api/math/vector2.h>
-#include <dali/integration-api/resource-declarations.h>
namespace Dali
{
{
segment = t * numSegs;
float segLength = 1.0f / numSegs;
- float segStart = (float)segment * segLength;
+ float segStart = static_cast<float>( segment ) * segLength;
tLocal = (t - segStart) * numSegs;
}
}
int arrayIndex = index - PROPERTY_CUSTOM_START_INDEX;
if( arrayIndex >= 0 )
{
- if( arrayIndex < (int)mCustomProperties.Count() ) // we can only access the first 2 billion custom properties
+ if( arrayIndex < static_cast<int>( mCustomProperties.Count() ) ) // we can only access the first 2 billion custom properties
{
property = static_cast<CustomPropertyMetadata*>(mCustomProperties[ arrayIndex ]);
}
AnimatablePropertyMetadata* Object::FindAnimatableProperty( Property::Index index ) const
{
- for ( int arrayIndex = 0; arrayIndex < (int)mAnimatableProperties.Count(); arrayIndex++ )
+ const PropertyMetadataLookup::SizeType count = mAnimatableProperties.Count();
+ for ( PropertyMetadataLookup::SizeType arrayIndex = 0; arrayIndex < count; ++arrayIndex )
{
AnimatablePropertyMetadata* property = static_cast<AnimatablePropertyMetadata*>( mAnimatableProperties[ arrayIndex ] );
if( property->index == index )
if( parentTypeInfo )
{
// Go through each custom property
- for ( int arrayIndex = 0; arrayIndex < (int)mCustomProperties.Count(); arrayIndex++ )
+ const PropertyMetadataLookup::SizeType count = mCustomProperties.Count();
+ for ( PropertyMetadataLookup::SizeType arrayIndex = 0; arrayIndex < count; ++arrayIndex )
{
CustomPropertyMetadata* customProperty = static_cast<CustomPropertyMetadata*>( mCustomProperties[ arrayIndex ] );
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y,
- ( hitTestResults.actor ? (void*)&hitTestResults.actor.GetBaseObject() : NULL ),
+ ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ),
( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ),
hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y );
Dali::Actor primaryHitActor = primaryPoint.hitActor;
TouchPoint::State primaryPointState = primaryPoint.state;
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? (void*)&primaryPoint.hitActor.GetBaseObject() : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetName().c_str() : "" );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? (void*)&consumedActor.GetBaseObject() : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
if ( ( primaryPointState == TouchPoint::Started ) &&
( hoverEvent.GetPointCount() == 1 ) &&
{
if ( lastPrimaryHitActor->GetLeaveRequired() )
{
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Hit): (%p) %s\n", (void*)lastPrimaryHitActor, lastPrimaryHitActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Hit): (%p) %s\n", reinterpret_cast< void* >( lastPrimaryHitActor ), lastPrimaryHitActor->GetName().c_str() );
leaveEventConsumer = EmitHoverSignals( mLastPrimaryHitActor.GetActor(), lastRenderTaskImpl, hoverEvent, TouchPoint::Leave );
}
}
{
// At this point mLastPrimaryHitActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Hit): (%p) %s\n", (void*)lastPrimaryHitActor, lastPrimaryHitActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Hit): (%p) %s\n", reinterpret_cast< void* >( lastPrimaryHitActor ), lastPrimaryHitActor->GetName().c_str() );
leaveEventConsumer = EmitHoverSignals( mLastPrimaryHitActor.GetActor(), lastRenderTaskImpl, hoverEvent, TouchPoint::Interrupted );
}
}
{
if( lastConsumedActor->GetLeaveRequired() )
{
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Consume): (%p) %s\n", (void*)lastConsumedActor, lastConsumedActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Consume): (%p) %s\n", reinterpret_cast< void* >( lastConsumedActor ), lastConsumedActor->GetName().c_str() );
EmitHoverSignals( lastConsumedActor, lastRenderTaskImpl, hoverEvent, TouchPoint::Leave );
}
}
{
// At this point mLastConsumedActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Consume): (%p) %s\n", (void*)lastConsumedActor, lastConsumedActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Consume): (%p) %s\n", reinterpret_cast< void* >( lastConsumedActor ), lastConsumedActor->GetName().c_str() );
EmitHoverSignals( mLastConsumedActor.GetActor(), lastRenderTaskImpl, hoverEvent, TouchPoint::Interrupted );
}
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y,
- ( hitTestResults.actor ? (void*)&hitTestResults.actor.GetBaseObject() : NULL ),
+ ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ),
( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ),
hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y );
Dali::Actor primaryHitActor = primaryPoint.GetHitActor();
PointState::Type primaryPointState = primaryPoint.GetState();
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? (void*)&primaryHitActor.GetBaseObject() : NULL, primaryHitActor ? primaryHitActor.GetName().c_str() : "" );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? (void*)&consumedActor.GetBaseObject() : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
if ( ( primaryPointState == PointState::DOWN ) &&
( touchEvent.GetPointCount() == 1 ) &&
{
if ( lastPrimaryHitActor->GetLeaveRequired() )
{
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Hit): (%p) %s\n", (void*)lastPrimaryHitActor, lastPrimaryHitActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Hit): (%p) %s\n", reinterpret_cast< void* >( lastPrimaryHitActor ), lastPrimaryHitActor->GetName().c_str() );
leaveEventConsumer = EmitTouchSignals( mLastPrimaryHitActor.GetActor(), lastRenderTaskImpl, touchEvent, touchData, PointState::LEAVE );
}
}
{
// At this point mLastPrimaryHitActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Hit): (%p) %s\n", (void*)lastPrimaryHitActor, lastPrimaryHitActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Hit): (%p) %s\n", reinterpret_cast< void* >( lastPrimaryHitActor ), lastPrimaryHitActor->GetName().c_str() );
leaveEventConsumer = EmitTouchSignals( mLastPrimaryHitActor.GetActor(), lastRenderTaskImpl, touchEvent, touchData, PointState::INTERRUPTED );
}
}
{
if( lastConsumedActor->GetLeaveRequired() )
{
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Consume): (%p) %s\n", (void*)lastConsumedActor, lastConsumedActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "LeaveActor(Consume): (%p) %s\n", reinterpret_cast< void* >( lastConsumedActor ), lastConsumedActor->GetName().c_str() );
EmitTouchSignals( lastConsumedActor, lastRenderTaskImpl, touchEvent, touchData, PointState::LEAVE );
}
}
{
// At this point mLastConsumedActor was touchable and sensitive in the previous touch event process but is not in the current one.
// An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Consume): (%p) %s\n", (void*)lastConsumedActor, lastConsumedActor->GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "InterruptedActor(Consume): (%p) %s\n", reinterpret_cast< void* >( lastConsumedActor ), lastConsumedActor->GetName().c_str() );
EmitTouchSignals( mLastConsumedActor.GetActor(), lastRenderTaskImpl, touchEvent, touchData, PointState::INTERRUPTED );
}
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
DALI_LOG_INFO( gLogFilter, Debug::General, " Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
event.point.x, event.point.y,
- ( hitTestResults.actor ? (void*)&hitTestResults.actor.GetBaseObject() : NULL ),
+ ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ),
( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ),
hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y );
// Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached.
Dali::Actor consumedActor = EmitWheelSignals( hitTestResults.actor, wheelEvent );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? (void*)&hitTestResults.actor.GetBaseObject() : NULL, hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? (void*)&consumedActor.GetBaseObject() : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
}
else
{
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
// Get image size from buffer
Dali::Integration::PlatformAbstraction& platformAbstraction = Internal::ThreadLocalStorage::Get().GetPlatformAbstraction();
const ImageDimensions expectedSize = platformAbstraction.GetClosestImageSize( buffer, size, fittingMode, samplingMode, orientationCorrection );
- image->mWidth = (unsigned int) expectedSize.GetWidth();
- image->mHeight = (unsigned int) expectedSize.GetHeight();
+ image->mWidth = static_cast<unsigned int>( expectedSize.GetWidth() );
+ image->mHeight = static_cast<unsigned int>( expectedSize.GetHeight() );
// Load the image synchronously
Integration::BitmapPtr bitmap = platformAbstraction.DecodeBuffer( resourceType, &(buffer->GetVector()[0]), encodedImageByteCount );
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
void FrameBuffer::AttachColorTexture( TexturePtr texture, unsigned int mipmapLevel, unsigned int layer )
{
- if( (unsigned int)( texture->GetWidth() / ( 1 << mipmapLevel ) ) == mWidth &&
- (unsigned int)( texture->GetHeight() / ( 1 << mipmapLevel ) ) == mHeight )
+ if( ( texture->GetWidth() / ( 1u << mipmapLevel ) == mWidth ) &&
+ ( texture->GetHeight() / ( 1u << mipmapLevel ) == mHeight ) )
{
mColor = texture;
AttachColorTextureToFrameBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject, texture->GetRenderObject(), mipmapLevel, layer );
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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( NULL != mRenderObject )
{
- SetFilterModeMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, (unsigned int)minFilter, (unsigned int)magFilter );
+ SetFilterModeMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, static_cast< unsigned int >( minFilter ), static_cast< unsigned int >( magFilter ) );
}
}
{
if( NULL != mRenderObject )
{
- SetWrapModeMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, (unsigned int)rWrap, (unsigned int)sWrap, (unsigned int)tWrap );
+ SetWrapModeMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, static_cast< unsigned int >( rWrap ), static_cast< unsigned int >( sWrap ), static_cast< unsigned int >( tWrap ) );
}
}
#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
// INTERNAL INCLUDES
#include <dali/public-api/object/property.h>
-#include <dali/integration-api/resource-declarations.h>
#include <dali/internal/common/buffer-index.h>
namespace Dali
#define DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_DATA_PROVIDER_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
* limitations under the License.
*/
#include <dali/public-api/common/dali-vector.h>
-#include <dali/integration-api/resource-declarations.h>
#include <dali/internal/common/buffer-index.h>
namespace Dali
#define __DALI_INTERNAL_CONTEXT_H__
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
*/
void PrintGlString(const char* stringName, GLenum stringId)
{
- DALI_LOG_INFO(Debug::Filter::gRender, Debug::General, "GL %s = %s\n", stringName, (const char *)GetString( stringId ) );
+ DALI_LOG_INFO(Debug::Filter::gRender, Debug::General, "GL %s = %s\n", stringName, reinterpret_cast< const char * >( GetString( stringId ) ) );
}
/****************************************************************************************
#define DALI_INTERNAL_RENDER_FRAME_BUFFER_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
#include <dali/internal/render/gl-resources/context.h>
#include <dali/internal/render/renderers/render-sampler.h>
#include <dali/integration-api/gl-defines.h>
-#include <dali/integration-api/resource-declarations.h>
namespace Dali
{
+/*
+ * Copyright (c) 2017 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.
+ *
+ */
#include <dali/internal/render/renderers/render-property-buffer.h>
#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
GetPropertyImplementationGlType(attributeType),
GL_FALSE, // Not normalized
elementSize,
- (void*)attributeOffset );
+ reinterpret_cast< void* >( attributeOffset ) );
}
}
Program* program = mRenderDataProvider->GetShader().GetProgram();
if( !program )
{
- DALI_LOG_ERROR( "Failed to get program for shader at address %p.\n", (void*)&mRenderDataProvider->GetShader() );
+ DALI_LOG_ERROR( "Failed to get program for shader at address %p.\n", reinterpret_cast< void* >( &mRenderDataProvider->GetShader() ) );
return;
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
for( int i=0; i<numberOfActiveUniforms; ++i )
{
- mGlAbstraction.GetActiveUniform( mProgramId, (GLuint)i, uniformMaxNameLength,
+ mGlAbstraction.GetActiveUniform( mProgramId, static_cast< GLuint >( i ), uniformMaxNameLength,
&nameLength, &number, &type, name );
if( type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES )
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
++iter;
continue;
}
- float previousValueWeight = (float)(MAX_GESTURE_AGE - (lastVSyncTime - lastTime)) / (float)MAX_GESTURE_AGE;
+ float previousValueWeight = ( static_cast< float >( MAX_GESTURE_AGE ) - (lastVSyncTime - lastTime) ) / static_cast< float >( MAX_GESTURE_AGE );
float velMag = currentGesture.screen.velocity.Length();
float velDiff = velMag - screenVelocity.Length();
float acceleration = 0.0f;
#define DALI_INTERNAL_SCENE_GRAPH_RENDER_INSTRUCTION_PROCESSOR_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
// INTERNAL INCLUDES
#include <dali/internal/common/buffer-index.h>
#include <dali/internal/update/manager/sorted-layers.h>
-#include <dali/integration-api/resource-declarations.h>
#include <dali/public-api/common/dali-vector.h>
namespace Dali
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/common/dali-common.h>
-#include <dali/integration-api/resource-declarations.h>
-
#include <dali/internal/common/message.h>
#include <dali/internal/common/type-abstraction-enums.h>
#include <dali/internal/common/shader-saver.h>
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
size_t tokenLength = endOfToken - startOfToken;
// Allocate space for symbol
- char *mangledSymbol = (char*)malloc(tokenLength+1u);
+ char *mangledSymbol = reinterpret_cast< char* >( malloc( tokenLength + 1u ) );
if(mangledSymbol != NULL)
{
strncpy(mangledSymbol, startOfToken, tokenLength);
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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( capacity > oldCapacity )
{
const SizeType wholeAllocation = sizeof(SizeType) * 2u + capacity * elementSize;
- void* wholeData = (void*) new unsigned char[ wholeAllocation ];
+ void* wholeData = reinterpret_cast< void* >( new unsigned char[ wholeAllocation ] );
DALI_ASSERT_ALWAYS( wholeData && "VectorBase::Reserve - Memory allocation failed" );
#if defined( DEBUG_ENABLED )
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
float Quaternion::Length() const
{
- return (float)sqrt(mVector.w * mVector.w + mVector.Dot(mVector));
+ return static_cast< float >( sqrt(mVector.w * mVector.w + mVector.Dot(mVector) ) );
}
float Quaternion::LengthSquared() const
{
- return (float)(mVector.w * mVector.w + mVector.Dot(mVector));
+ return static_cast< float >( mVector.w * mVector.w + mVector.Dot(mVector) );
}
void Quaternion::Normalize()