#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.
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
/*
- * 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.
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<unsigned char*>( 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;
#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.
KeyFrameBaseSpec<V>& operator=( const KeyFrameBaseSpec<V>& keyFrames )
{
- if( *this != keyFrames )
+ if( this != &keyFrames )
{
mPVs.clear();
mPVs = keyFrames.mPVs;
#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.
*/
PropertyInputAccessor& operator=(const PropertyInputAccessor& accessor)
{
- mInput = accessor.mInput;
- mComponentIndex = accessor.mComponentIndex;
+ if( this != &accessor )
+ {
+ mInput = accessor.mInput;
+ mComponentIndex = accessor.mComponentIndex;
+ }
return *this;
}
#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.
*/
PropertyInputIndexer& operator=( const PropertyInputIndexer& other )
{
- mBufferIndex = other.mBufferIndex;
- mInput = other.mInput;
+ if( this != &other )
+ {
+ mBufferIndex = other.mBufferIndex;
+ mInput = other.mInput;
+ }
return *this;
}
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); i<dataSize; i++ )
{
{
DiscardQueue::DiscardQueue( RenderQueue& renderQueue )
-: mRenderQueue( renderQueue )
+: mRenderQueue( renderQueue ),
+ mNodeQueue(),
+ mShaderQueue(),
+ mRendererQueue(),
+ mCameraQueue(),
+ mGeometryBatcher( NULL )
{
}
struct Impl
{
- Impl() :
+ Impl()
+ : batchParents(),
+ updateManager( NULL ),
currentFrame( 0 )
- {}
+ {
+ }
int GetBatchKeyIndex( size_t batchParentIndex, const BatchKey& key )
{
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
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,
Property::Array* arrayValue;
Property::Map* mapValue;
};
+
+private:
+
+ Impl( const Impl& ); ///< Undefined
+ Impl& operator=( const Impl& ); ///< Undefined
};
Property::Value::Value()