utc-Dali-Internal-Image-Culling.cpp
utc-Dali-Internal-Text-Culling.cpp
utc-Dali-Internal-Constraint.cpp
+ utc-Dali-Internal-FixedSizeMemoryPool.cpp
+ utc-Dali-Internal-MemoryPoolObjectAllocator.cpp
)
LIST(APPEND TC_SOURCES
#include <dali/public-api/dali-core.h>
#include <dali-test-suite-utils.h>
+// Internal headers are allowed here
+
+#include <dali/internal/common/fixed-size-memory-pool.h>
+
using namespace Dali;
-void utc_dali_fixedsizememorypool_startup(void)
+void utc_dali_internal_fixedsizememorypool_startup(void)
{
test_return_value = TET_UNDEF;
}
-void utc_dali_fixedsizememorypool_cleanup(void)
+void utc_dali_internal_fixedsizememorypool_cleanup(void)
{
test_return_value = TET_PASS;
}
gTestObjectMethod = 0;
gTestObjectDataAccess = 0;
- FixedSizeMemoryPool memoryPool( TypeSizeWithAlignment< TestObject >::size );
+ Internal::FixedSizeMemoryPool memoryPool( Internal::TypeSizeWithAlignment< TestObject >::size );
TestObject* testObject1 = new (memoryPool.Allocate()) TestObject();
DALI_TEST_CHECK( testObject1 );
const unsigned int numObjects = 1024 * 1024;
- FixedSizeMemoryPool memoryPool( TypeSizeWithAlignment< TestObject >::size, initialCapacity, maximumCapacity );
+ Internal::FixedSizeMemoryPool memoryPool( Internal::TypeSizeWithAlignment< TestObject >::size, initialCapacity, maximumCapacity );
Dali::Vector<TestObject*> objects;
objects.Reserve( numObjects );
#include <dali/public-api/dali-core.h>
#include <dali-test-suite-utils.h>
+// Internal headers are allowed here
+
+#include <dali/internal/common/memory-pool-object-allocator.h>
+
using namespace Dali;
-void utc_dali_memorypoolobjectallocator_startup(void)
+void utc_dali_internal_memorypoolobjectallocator_startup(void)
{
test_return_value = TET_UNDEF;
}
-void utc_dali_memorypoolobjectallocator_cleanup(void)
+void utc_dali_internal_memorypoolobjectallocator_cleanup(void)
{
test_return_value = TET_PASS;
}
int UtcDaliMemoryPoolObjectAllocatorObjectAllocation(void)
{
- MemoryPoolObjectAllocator< MemoryPoolObjectAllocatorTestObject > allocator;
+ Internal::MemoryPoolObjectAllocator< MemoryPoolObjectAllocatorTestObject > allocator;
// Allocate an object
MemoryPoolObjectAllocatorTestObject* testObject1 = allocator.Allocate();
int UtcDaliMemoryPoolObjectAllocatorObjectRawAllocation(void)
{
- MemoryPoolObjectAllocator< MemoryPoolObjectAllocatorTestObject > allocator;
+ Internal::MemoryPoolObjectAllocator< MemoryPoolObjectAllocatorTestObject > allocator;
MemoryPoolObjectAllocatorTestObject* testObject = new ( allocator.AllocateRaw() ) MemoryPoolObjectAllocatorTestObject();
DALI_TEST_CHECK( testObject );
int UtcDaliMemoryPoolObjectAllocatorObjectAllocationPOD(void)
{
- MemoryPoolObjectAllocator< bool > allocator;
+ Internal::MemoryPoolObjectAllocator< bool > allocator;
bool* testObject1 = allocator.Allocate();
DALI_TEST_CHECK( testObject1 );
utc-Dali-DynamicsWorld.cpp
utc-Dali-DynamicsWorldConfig.cpp
utc-Dali-EncodedBufferImage.cpp
- utc-Dali-FixedSizeMemoryPool.cpp
utc-Dali-Font.cpp
utc-Dali-FontParameters.cpp
utc-Dali-FrameBufferImage.cpp
utc-Dali-MathUtils.cpp
utc-Dali-Matrix.cpp
utc-Dali-Matrix3.cpp
- utc-Dali-MemoryPoolObjectAllocator.cpp
utc-Dali-MeshActor.cpp
utc-Dali-MeshData.cpp
utc-Dali-MouseWheelEvent.cpp
*/
// CLASS HEADER
-#include <dali/public-api/common/fixed-size-memory-pool.h>
+#include <dali/internal/common/fixed-size-memory-pool.h>
// INTERNAL HEADERS
#include <dali/public-api/dali-core.h>
namespace Dali
{
+namespace Internal
+{
+
/**
* @brief Private implementation class
*/
void* mDeletedObjects; ///< Pointer to the head of the list of deleted objects. The addresses are stored in the allocated memory blocks.
};
-
-
FixedSizeMemoryPool::FixedSizeMemoryPool( SizeType fixedSize, SizeType initialCapacity, SizeType maximumBlockCapacity )
{
mImpl = new Impl( fixedSize, initialCapacity, maximumBlockCapacity );
mImpl->mDeletedObjects = memory;
}
+} // namespace Internal
+
} // namespace Dali
-#ifndef __DALI_FIXED_SIZE_MEMORY_POOL_H__
-#define __DALI_FIXED_SIZE_MEMORY_POOL_H__
+#ifndef __DALI_INTERNAL_FIXED_SIZE_MEMORY_POOL_H__
+#define __DALI_INTERNAL_FIXED_SIZE_MEMORY_POOL_H__
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
namespace Dali
{
+namespace Internal
+{
+
/**
* @brief Calculate the size of a type taking alignment into account
*/
};
+} // namespace Internal
} // namespace Dali
-#endif /* __DALI_FIXED_SIZE_MEMORY_POOL_H__ */
+#endif /* __DALI_INTERNAL_FIXED_SIZE_MEMORY_POOL_H__ */
-#ifndef __DALI_MEMORY_POOL_OBJECT_ALLOCATOR_H__
-#define __DALI_MEMORY_POOL_OBJECT_ALLOCATOR_H__
+#ifndef __DALI_INTERNAL_MEMORY_POOL_OBJECT_ALLOCATOR_H__
+#define __DALI_INTERNAL_MEMORY_POOL_OBJECT_ALLOCATOR_H__
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
*/
// INTERNAL INCLUDES
-#include <dali/public-api/common/fixed-size-memory-pool.h>
+#include <dali/internal/common/fixed-size-memory-pool.h>
namespace Dali
{
+namespace Internal
+{
+
/**
* @brief Helper for allocating/deallocating objects using a memory pool.
*
};
+} // namespace Internal
+
} // namespace Dali
-#endif /* __DALI_MEMORY_POOL_OBJECT_ALLOCATOR_H__ */
+#endif /* __DALI_INTERNAL_MEMORY_POOL_OBJECT_ALLOCATOR_H__ */
$(internal_src_dir)/common/text-parameters.cpp \
$(internal_src_dir)/common/image-sampler.cpp \
$(internal_src_dir)/common/dali-hash.cpp \
+ $(internal_src_dir)/common/fixed-size-memory-pool.cpp \
\
$(internal_src_dir)/event/actor-attachments/actor-attachment-impl.cpp \
$(internal_src_dir)/event/actor-attachments/camera-attachment-impl.cpp \
#include <dali/public-api/common/constants.h>
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/common/fixed-size-memory-pool.h>
#include <dali/public-api/common/intrusive-ptr.h>
#include <dali/public-api/common/loading-state.h>
-#include <dali/public-api/common/memory-pool-object-allocator.h>
#include <dali/public-api/common/mutex.h>
#include <dali/public-api/common/stage.h>
#include <dali/public-api/common/vector-wrapper.h>
$(public_api_src_dir)/common/constants.cpp \
$(public_api_src_dir)/common/dali-common.cpp \
$(public_api_src_dir)/common/dali-vector.cpp \
- $(public_api_src_dir)/common/fixed-size-memory-pool.cpp \
$(public_api_src_dir)/common/mutex.cpp \
$(public_api_src_dir)/common/stage.cpp \
$(public_api_src_dir)/dynamics/dynamics-body.cpp \
$(public_api_src_dir)/common/constants.h \
$(public_api_src_dir)/common/dali-common.h \
$(public_api_src_dir)/common/dali-vector.h \
- $(public_api_src_dir)/common/fixed-size-memory-pool.h \
$(public_api_src_dir)/common/intrusive-ptr.h \
$(public_api_src_dir)/common/loading-state.h \
$(public_api_src_dir)/common/mutex.h \
$(public_api_src_dir)/common/map-wrapper.h \
- $(public_api_src_dir)/common/memory-pool-object-allocator.h \
$(public_api_src_dir)/common/ref-counted-dali-vector.h \
$(public_api_src_dir)/common/set-wrapper.h \
$(public_api_src_dir)/common/scoped-pointer.h \