Change-Id: I9bef1e40dbcd4a5feb8bf518ade181e5e9d08cdb
#define __TEST_GL_SYNC_ABSTRACTION_H__
/*
#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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
int GetNumberOfSyncObjects();
private:
int GetNumberOfSyncObjects();
private:
+
+ TestGlSyncAbstraction( const TestGlSyncAbstraction& ); ///< Undefined
+ TestGlSyncAbstraction& operator=( const TestGlSyncAbstraction& ); ///< Undefined
+
typedef std::vector<TestSyncObject*> SyncContainer;
typedef SyncContainer::iterator SyncIter;
SyncContainer mSyncObjects; ///< The sync objects
typedef std::vector<TestSyncObject*> SyncContainer;
typedef SyncContainer::iterator SyncIter;
SyncContainer mSyncObjects; ///< The sync objects
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DALI_TEST_CHECK(flickSpeedFactor != 0.0f);
DALI_TEST_CHECK(flickSpeedFactor != 0.0f);
+ // White box test here: -( itemId / NoOfItemsPerRow(default 4) ) * NoOfItemsPerRow
+ DALI_TEST_EQUALS( -1.0f, gridLayout->GetItemScrollToPosition( 1 ), TEST_LOCATION );
+
ItemLayoutPtr depthLayout = DefaultItemLayout::New( DefaultItemLayout::DEPTH );
view.AddLayout(*depthLayout);
ItemLayoutPtr depthLayout = DefaultItemLayout::New( DefaultItemLayout::DEPTH );
view.AddLayout(*depthLayout);
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
float DepthLayout::GetItemScrollToPosition(unsigned int itemId) const
{
float DepthLayout::GetItemScrollToPosition(unsigned int itemId) const
{
- float rowIndex = static_cast<float>(itemId / mImpl->mNumberOfColumns);
+ float rowIndex = static_cast< float >( itemId ) / mImpl->mNumberOfColumns;
return -rowIndex * static_cast<float>(mImpl->mNumberOfColumns);
}
return -rowIndex * static_cast<float>(mImpl->mNumberOfColumns);
}
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
float GridLayout::GetItemScrollToPosition(unsigned int itemId) const
{
float GridLayout::GetItemScrollToPosition(unsigned int itemId) const
{
- float rowIndex = static_cast<float>(itemId / mImpl->mNumberOfColumns);
+ float rowIndex = static_cast< float >( itemId ) / mImpl->mNumberOfColumns;
return -rowIndex * static_cast<float>(mImpl->mNumberOfColumns);
}
return -rowIndex * static_cast<float>(mImpl->mNumberOfColumns);
}
#define __DALI_TOOLKIT_IMAGE_LOAD_THREAD_H__
/*
#define __DALI_TOOLKIT_IMAGE_LOAD_THREAD_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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Add a task in to the loading queue
*
* @param[in] task The task added to the queue.
* Add a task in to the loading queue
*
* @param[in] task The task added to the queue.
+ *
+ * @note This class takes ownership of the task object
*/
void AddTask( LoadingTask* task );
*/
void AddTask( LoadingTask* task );
#define __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__
/*
#define __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
bool IsInitialized() const;
private:
bool IsInitialized() const;
private:
+
+ ScriptPluginProxy( const ScriptPluginProxy& ); ///< Undefined
+ ScriptPluginProxy& operator=( const ScriptPluginProxy& ); ///< Undefined
+
/**
* @brief Dynamically loads the script plugin.
*/
/**
* @brief Dynamically loads the script plugin.
*/
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// At this point the character common for all scripts has no font assigned.
// If there is a valid previously cached default font for it, use that one.
fontId = cachedDefaultFontId;
// At this point the character common for all scripts has no font assigned.
// If there is a valid previously cached default font for it, use that one.
fontId = cachedDefaultFontId;
- * 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Vector2 topLeft = Vector2( position.x - 0.5f, position.y - 0.5f );
float fBlockX = texelBlockWidth * static_cast< float >( block % atlasWidthInBlocks );
Vector2 topLeft = Vector2( position.x - 0.5f, position.y - 0.5f );
float fBlockX = texelBlockWidth * static_cast< float >( block % atlasWidthInBlocks );
+
+ // In the next expression, we have purposely made ( block / atlasWidthInBlocks ) yield an integer value and then convert to float as
+ // we do not want the remainder in that expression to affect the value of fBlockY
float fBlockY = texelBlockHeight * static_cast< float >( block / atlasWidthInBlocks );
// Add on texture filtering compensation ( half a texel plus compensation for filled pixel in top left corner )
float fBlockY = texelBlockHeight * static_cast< float >( block / atlasWidthInBlocks );
// Add on texture filtering compensation ( half a texel plus compensation for filled pixel in top left corner )
mPlaceholderTextColor( 0.8f, 0.8f, 0.8f, 0.8f ),
mEventQueue(),
mInputStyleChangedQueue(),
mPlaceholderTextColor( 0.8f, 0.8f, 0.8f, 0.8f ),
mEventQueue(),
mInputStyleChangedQueue(),
+ mPreviousState( INACTIVE ),
mState( INACTIVE ),
mPrimaryCursorPosition( 0u ),
mLeftSelectionPosition( 0u ),
mState( INACTIVE ),
mPrimaryCursorPosition( 0u ),
mLeftSelectionPosition( 0u ),
if( spread )
{
Toolkit::GradientVisual::SpreadMethod::Type spreadMethod = Toolkit::GradientVisual::SpreadMethod::PAD;
if( spread )
{
Toolkit::GradientVisual::SpreadMethod::Type spreadMethod = Toolkit::GradientVisual::SpreadMethod::PAD;
- if( Scripting::GetEnumerationProperty( *spread, SPREAD_METHOD_TABLE, SPREAD_METHOD_TABLE_COUNT, spreadMethod ) );
+ if( Scripting::GetEnumerationProperty( *spread, SPREAD_METHOD_TABLE, SPREAD_METHOD_TABLE_COUNT, spreadMethod ) )
{
mGradient->SetSpreadMethod( spreadMethod );
}
{
mGradient->SetSpreadMethod( spreadMethod );
}
NinePatchImage ninePatch = NinePatchImage::New( url );
if( ninePatch )
{
NinePatchImage ninePatch = NinePatchImage::New( url );
if( ninePatch )
{
- Data* data = new Data();
- data->hash = hash;
- data->url = url;
BufferImage croppedImage = ninePatch.CreateCroppedBufferImage();
if( croppedImage )
{
BufferImage croppedImage = ninePatch.CreateCroppedBufferImage();
if( croppedImage )
{
+ Data* data = new Data();
+ data->hash = hash;
+ data->url = url;
data->textureSet = TextureSet::New();
TextureSetImage( data->textureSet, 0u, croppedImage );
data->croppedWidth = croppedImage.GetWidth();
data->textureSet = TextureSet::New();
TextureSetImage( data->textureSet, 0u, croppedImage );
data->croppedWidth = croppedImage.GetWidth();