Removed unnecessary graphics utility headers
authorDavid Steele <david.steele@samsung.com>
Tue, 8 Jan 2019 18:55:59 +0000 (18:55 +0000)
committerDavid Steele <david.steele@samsung.com>
Tue, 8 Jan 2019 18:55:59 +0000 (18:55 +0000)
Change-Id: I64842b927942e877057fd976f0a74987373ca9fa

build/tizen/dali-core/Makefile.am
dali/graphics-api/file.list
dali/graphics-api/graphics-api-controller.h
dali/graphics-api/utility/graphics-asserts.h [deleted file]
dali/graphics-api/utility/utility-builder.h [deleted file]
dali/graphics-api/utility/utility-memory-pool.h [deleted file]
dali/graphics-api/utility/utility-queue.h [deleted file]
dali/graphics-api/utility/utility-strong-type.h [deleted file]
dali/graphics-api/utility/utility-synchronized.h [deleted file]
dali/graphics-api/utility/utility-traits.h [deleted file]

index aebc534181fdf653717b19ba5303ecf00cb1e5e4..663a9288fb3de939522e26a3194b460d1dff11c7 100644 (file)
@@ -85,9 +85,7 @@ platformabstractiongraphics_HEADERS = $(graphics_integration_header_files)
 
 # Graphics API (Integration)
 graphicsapidir = $(includedir)/dali/graphics-api
-graphicsapiutilitydir = $(includedir)/dali/graphics-api/utility
 graphicsapi_HEADERS = $(graphics_api_header_files)
-graphicsapiutility_HEADERS = $(graphics_api_utility_header_files)
 
 #devel api (used by adaptor / toolkit
 develapidir = $(devincludepath)/dali/devel-api
index 5fedf73eb0ff655394e05d2c3064e1e411867cf0..7974da3c19dec6d24e484b74251aa03f3de49663 100644 (file)
@@ -25,12 +25,3 @@ graphics_api_header_files = \
     $(graphics_api_src_dir)/graphics-api-types-debug.h \
     $(graphics_api_src_dir)/graphics-api-types.h \
     $(graphics_api_src_dir)/graphics-api-utility.h
-
-graphics_api_utility_header_files=\
-    $(graphics_api_src_dir)/utility/graphics-asserts.h \
-    $(graphics_api_src_dir)/utility/utility-builder.h \
-    $(graphics_api_src_dir)/utility/utility-memory-pool.h \
-    $(graphics_api_src_dir)/utility/utility-queue.h \
-    $(graphics_api_src_dir)/utility/utility-strong-type.h \
-    $(graphics_api_src_dir)/utility/utility-synchronized.h \
-    $(graphics_api_src_dir)/utility/utility-traits.h
\ No newline at end of file
index 717f539bad39d610312f9936343d4356ae30c746..ecac45a74c9c0d976c1ce78c559c72fc59e7cfdc 100644 (file)
@@ -34,7 +34,6 @@
 #include <dali/graphics-api/graphics-api-pipeline-factory.h>
 #include <dali/graphics-api/graphics-api-pipeline.h>
 #include <dali/graphics-api/graphics-api-sampler-factory.h>
-#include <dali/graphics-api/utility/utility-builder.h>
 
 namespace Dali
 {
diff --git a/dali/graphics-api/utility/graphics-asserts.h b/dali/graphics-api/utility/graphics-asserts.h
deleted file mode 100644 (file)
index 5af6829..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef DALI_GRAPHICS_ASSERTS_H
-#define DALI_GRAPHICS_ASSERTS_H
-
-/*
- * Copyright (c) 2018 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 Graphics
-{
-namespace Utility
-{
-
-template< typename T >
-void Assert(bool condition, const T& message)
-{
-  if(!condition)
-  {
-    throw message;
-  }
-}
-
-template< typename T >
-void AssertEqual(const T& lhs, const T& rhs)
-{
-  Assert(lhs == rhs, "Values are not equal.");
-}
-
-template< typename T >
-void AssertLessOrEqual(const T& lhs, const T& rhs)
-{
-  Assert(lhs <= rhs, "Value must be less or equal.");
-}
-
-template< typename T >
-void AssertGraterOrEqual(const T& lhs, const T& rhs)
-{
-  Assert(lhs >= rhs, "Value must be grater or equal.");
-}
-
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_ASSERTS_H
diff --git a/dali/graphics-api/utility/utility-builder.h b/dali/graphics-api/utility/utility-builder.h
deleted file mode 100644 (file)
index b97bd06..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef DALI_GRAPHICS_UTILITY_BUILDER_H
-#define DALI_GRAPHICS_UTILITY_BUILDER_H
-
-/*
- * Copyright (c) 2018 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <cstddef>
-#include <utility>
-#include <tuple>
-
-// INTERNAL INCLUDES
-#include <dali/graphics-api/utility/utility-traits.h>
-
-namespace Dali
-{
-namespace Graphics
-{
-namespace Utility
-{
-
-template<typename T, typename... Params>
-class Builder
-{
-public:
-  template<typename... Values>
-  Builder( Values&&... values ) : mParameters{}
-  {
-    SetParameters( values... );
-  }
-
-  template<typename Return>
-  operator Return()
-  {
-    return Build( std::index_sequence_for<Params...>{} );
-  }
-
-  auto Build()
-  {
-    return Build( std::index_sequence_for<Params...>{} );
-  }
-
-  template<typename V>
-  void Set( V&& value )
-  {
-    SetParameters( std::forward<V>( value ) );
-  }
-
-private:
-  void SetParameters() const {};
-
-  template<typename V>
-  void SetParameters( V&& value )
-  {
-    std::get<std::remove_reference_t<V>>( mParameters ) = std::forward<V>( value );
-  }
-
-  template<typename Head, typename... Tail>
-  void SetParameters( Head&& head, Tail&&... tail )
-  {
-    SetParameters( std::forward<Head>( head ) );
-    SetParameters( std::forward<Tail...>( tail... ) );
-  }
-
-  template<size_t... Is>
-  T Build( std::index_sequence<Is...> )
-  {
-    return T(std::move(std::get<Is>( mParameters ) )...);
-  }
-
-private: // data
-  std::tuple<Params...> mParameters;
-};
-
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_UTILITY_BUILDER_H
diff --git a/dali/graphics-api/utility/utility-memory-pool.h b/dali/graphics-api/utility/utility-memory-pool.h
deleted file mode 100644 (file)
index 2758cbd..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-#ifndef DALI_VULKAN_161117_UTILITY_MEMORY_POOL_H
-#define DALI_VULKAN_161117_UTILITY_MEMORY_POOL_H
-
-#include <cstdint>
-#include <cstdlib>
-#include <vector>
-
-namespace Dali
-{
-namespace Graphics
-{
-namespace Utility
-{
-class MemoryPool
-{
-public:
-  static const auto ALIGNMENT = 16u;
-
-  MemoryPool( uint32_t capacity, bool isFixed = false )
-  : mPageCapacity( capacity ),
-    mCapacity( 0 ),
-    mMarkedPageIndex( 0 ),
-    mMarkedOffset( 0 ),
-    mMarkedAllocationSize( 0 ),
-    mMarkedAllocationCount( 0 ),
-    mPageOffset( 0 ),
-    mPageIndex( 0 ),
-    mPages(),
-    mTotalPoolCapacity( 0 ),
-    mTotalPoolAllocationsSize( 0 ),
-    mTotalPoolAllocations( 0 ),
-    mIsFixed( isFixed )
-  {
-  }
-
-  ~MemoryPool()
-  {
-    if( !mPages.empty() )
-    {
-      mPages.clear();
-    }
-  }
-
-  void Mark()
-  {
-    mMarkedOffset          = mPageOffset;
-    mMarkedPageIndex       = mPageIndex;
-    mMarkedAllocationCount = mTotalPoolAllocations;
-    mMarkedAllocationSize  = mTotalPoolAllocationsSize;
-  }
-
-  void Rollback()
-  {
-    mPageOffset               = mMarkedOffset;
-    mPageIndex                = mMarkedPageIndex;
-    mTotalPoolAllocationsSize = mMarkedAllocationSize;
-    mTotalPoolAllocations     = mMarkedAllocationCount;
-  }
-
-  void RollbackAll()
-  {
-    mPageOffset               = 0;
-    mPageIndex                = 0;
-    mTotalPoolAllocationsSize = 0;
-    mTotalPoolAllocations     = 0;
-  }
-
-  void* Allocate( uint32_t size, uint32_t aligned = ALIGNMENT )
-  {
-    // if allocated size is more that page capacity, add a page of required size
-    if( size > mPageCapacity )
-    {
-      AddPage( size + ( aligned * 2 ) );
-    }
-    else if( mPageCapacity <= mPageOffset + size + aligned )
-    {
-      AddPage( mPageCapacity );
-    }
-
-    mPageOffset = ( ( mPageOffset + aligned ) / aligned ) * aligned;
-    auto retval = &mPages[mPageIndex].data[mPageOffset];
-    mPageOffset += size + aligned;
-
-    mTotalPoolAllocations++;
-    mTotalPoolAllocationsSize += size;
-
-    return retval;
-  }
-
-  template<class T, class... Args>
-  T* AllocateNew( Args... args )
-  {
-    return new( Allocate( sizeof( T ), ALIGNMENT ) ) T( args... );
-  }
-
-  template<class T>
-  T* Allocate( uint32_t elements )
-  {
-    return new( Allocate( sizeof( T ) * elements ) ) T[elements];
-  }
-
-  /**
-   * Trims unused memory
-   */
-  void Trim()
-  {
-    if( mPageIndex < mPages.size() - 1 )
-    {
-      mPages.resize( mPageIndex + 1 );
-    }
-  }
-
-private:
-  void AddPage( uint32_t pageCapacity )
-  {
-    mPages.emplace_back( pageCapacity );
-    mPageIndex  = uint32_t( mPages.size() - 1u );
-    mPageOffset = 0u;
-    mTotalPoolCapacity += pageCapacity;
-  }
-
-public:
-  //private:
-
-  struct Page
-  {
-    Page() = default;
-    Page( uint32_t _capacity ) : data( nullptr ), capacity( _capacity )
-    {
-    }
-
-    ~Page()
-    {
-      if( data )
-      {
-        free(data);
-      }
-    }
-    char*    data { nullptr };
-    uint32_t capacity { 0u };
-  };
-
-  uint32_t mPageCapacity;
-  uint32_t mCapacity;
-
-  uint32_t mMarkedPageIndex;
-  uint32_t mMarkedOffset;
-  uint32_t mMarkedAllocationSize;
-  uint32_t mMarkedAllocationCount;
-
-  uint32_t mPageOffset;
-  uint32_t mPageIndex;
-
-  std::vector<Page> mPages;
-
-  uint32_t mTotalPoolCapacity;
-  uint32_t mTotalPoolAllocationsSize;
-  uint32_t mTotalPoolAllocations;
-
-  bool mIsFixed;
-};
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif //DALI_VULKAN_161117_UTILITY_MEMORY_POOL_H
diff --git a/dali/graphics-api/utility/utility-queue.h b/dali/graphics-api/utility/utility-queue.h
deleted file mode 100644 (file)
index a31f0ed..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-#ifndef DALI_GRAPHICS_UTILITY_QUEUE_H
-#define DALI_GRAPHICS_UTILITY_QUEUE_H
-
-/*
- * Copyright (c) 2018 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <vector>
-#include <utility>
-#include <memory>
-#include <type_traits>
-
-#include <dali/graphics/utility/graphics-asserts.h>
-
-namespace Dali
-{
-namespace Graphics
-{
-namespace Utility
-{
-
-/**
- * @brief Queue implementation
- */
-template<typename T>
-class Queue
-{
-public:
-  Queue() : Queue(0, nullptr, nullptr, nullptr)
-  {
-  }
-
-  Queue(const Queue&) = delete;
-  Queue& operator=(const Queue&) = delete;
-
-  Queue(Queue&& queue) : Queue()
-  {
-    Swap(queue);
-  }
-
-  Queue& operator=(Queue&& queue)
-  {
-    if(this != &queue)
-    {
-      Queue(queue).Swap(*this);
-    }
-    return *this;
-  }
-
-  virtual ~Queue()
-  {
-    Resize(0);
-  }
-
-  using Iterator = T*;
-
-  constexpr const Iterator Head() const noexcept
-  {
-    return mHead;
-  }
-
-  constexpr const Iterator Tail() const noexcept
-  {
-    return mTail;
-  }
-
-  template< typename U >
-  void Enqueue(U&& element)
-  {
-    EnqueueEmplace(std::forward< U >(element));
-  }
-
-  template< typename... Args >
-  void EnqueueEmplace(Args&&... args)
-  {
-    IncreaseCapacity();
-    new(mTail) T(std::forward< Args >(args)...);
-    mTail = Inc(mTail);
-  }
-
-  /**
-   * @brief Pop element at Head()
-   */
-  T Dequeue()
-  {
-    if(!mBufferSize){
-      throw "Queue is empty!";
-    }
-
-    auto result = std::move(*mHead);
-    mHead->~T();
-    mHead = Inc(mHead);
-
-    DecreaseCapacity();
-
-    return result;
-  }
-
-  constexpr size_t Count() const noexcept
-  {
-    return mHead <= mTail ? mTail - mHead : mBufferSize - (mHead - mTail);
-  }
-
-  constexpr size_t GetCapacity() const noexcept
-  {
-    return mBufferSize ? mBufferSize - 1 : 0;
-  }
-
-  void SetCapacity(size_t capacity)
-  {
-    Resize(capacity ? capacity + 1 : 0);
-  }
-
-private:
-  static constexpr auto MIN_PREFERED_BLOCK_SIZE = size_t{1024};
-  static constexpr auto MIN_BUFFER_SIZE         = MIN_PREFERED_BLOCK_SIZE / sizeof(T);
-
-  /**
-   * @brief Increase a pointer to a queue element, wrapping around at the end
-   */
-  constexpr T* Inc(T* pointer) const noexcept
-  {
-    return ++pointer == mBuffer + mBufferSize ? mBuffer : pointer;
-  }
-
-  size_t MoveData(T* from, T* to, T* destination, size_t max)
-  {
-    auto count = size_t{};
-    while(from < to && count++ < max)
-    {
-      // move the object to the new memory
-      new(destination++) T(std::move(*from));
-      from++->~T();
-    }
-    return count;
-  }
-
-  void CallDeleter(T* from, T* to)
-  {
-    AssertLessOrEqual(from, to);
-    while(from < to)
-    {
-      from++->~T();
-    }
-  }
-
-  void IncreaseCapacity()
-  {
-    // There must always be an empty element
-    // If we are about to reach buffer size duplicate the size of the buffer
-    if(Count() + 1 >= mBufferSize)
-    {
-      Resize(mBufferSize ? mBufferSize * 2 : MIN_BUFFER_SIZE);
-    }
-  }
-
-  void DecreaseCapacity()
-  {
-    auto count = Count();
-
-    // If empty resize to zero
-    if(count == 0)
-    {
-      Resize(0);
-    }
-    else
-    {
-      auto newSize    = Count() + 1;
-      auto doubleSize = newSize * 2;
-
-      // There must always be an empty element
-      // If capacity is double of what it is required resize it
-      if(doubleSize <= mBufferSize && newSize >= MIN_BUFFER_SIZE)
-      {
-        Resize(newSize);
-      }
-    }
-  }
-
-  void Resize(size_t newBufferSize)
-  {
-    if(newBufferSize == mBufferSize)
-    {
-      return;
-    }
-
-    auto oldBufferSize = mBufferSize;
-    auto oldBuffer     = mBuffer;
-
-    mBufferSize = newBufferSize;
-    if(mBufferSize)
-    {
-      mBuffer = (T*)new Storage[mBufferSize];
-    }
-    else
-    {
-      mBuffer = nullptr;
-    }
-
-    if(mBufferSize && mHead != mTail)
-    {
-      auto totalCopied = ptrdiff_t{};
-
-      if(mHead < mTail)
-      {
-        totalCopied = MoveData(mHead, mTail, mBuffer, mBufferSize - 1);
-        CallDeleter(mHead + totalCopied, mTail);
-      }
-      else
-      {
-        auto part1   = oldBufferSize - (oldBuffer - mHead);
-        auto copied1 = MoveData(mHead, mHead + part1, mBuffer, mBufferSize - 1);
-        totalCopied += copied1;
-        if(copied1 == part1)
-        {
-          auto copied2 = MoveData(oldBuffer, mTail, mBuffer + part1, mBufferSize - part1 - 1);
-          CallDeleter(oldBuffer + copied2, mTail);
-          totalCopied += copied2;
-        }
-        else
-        {
-          CallDeleter(mHead + copied1, mHead + part1);
-        }
-      }
-      mHead = mBuffer;
-      mTail = mHead + totalCopied;
-    }
-    else
-    {
-      if(mHead <= mTail)
-      {
-        CallDeleter(mHead, mTail);
-      }
-      else
-      {
-        CallDeleter(oldBuffer, mTail);
-        CallDeleter(mHead, oldBuffer + oldBufferSize);
-      }
-      mTail = mHead = mBuffer;
-    }
-    if(oldBuffer)
-    {
-      delete[] (Storage*)oldBuffer;
-    }
-  }
-
-private:
-  void Swap(Queue& queue)
-  {
-    std::swap(mBufferSize, queue.mBufferSize);
-    std::swap(mBuffer, queue.mBuffer);
-    std::swap(mHead, queue.mHead);
-    std::swap(mTail, queue.mTail);
-  }
-
-  Queue(size_t bufferSize, T* buffer, T* head, T* tail)
-  : mBufferSize(bufferSize), mBuffer(buffer), mHead(head), mTail(tail)
-  {
-  }
-
-  // Correct type to hold the data type without initialising it
-  using Storage = typename std::aligned_storage<sizeof(T), alignof(T)>::type;
-
-  size_t mBufferSize; ///< Size of the buffer allocated
-  T*     mBuffer;     ///< Pointer to the buffer allocated
-  T*     mHead;       ///< Pointer to the Head element in the buffer
-  T*     mTail;       ///< Pointer to the Tail element in the buffer
-};
-
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_UTILITY_QUEUE_H
diff --git a/dali/graphics-api/utility/utility-strong-type.h b/dali/graphics-api/utility/utility-strong-type.h
deleted file mode 100644 (file)
index 4c74dfe..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef DALI_GRAPHICS_UTILITY_STRONG_TYPE_H
-#define DALI_GRAPHICS_UTILITY_STRONG_TYPE_H
-
-/*
- * Copyright (c) 2018 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <utility>
-#include <ostream>
-
-namespace Dali
-{
-namespace Graphics
-{
-namespace Utility
-{
-
-/**
- * @brief Type wrapper to enforce scemantics in other types
- */
-template<typename T, typename Tag>
-class StrongType final
-{
-public:
-  explicit StrongType( T value ) noexcept : mValue( std::move( value ) )
-  {
-  }
-
-  StrongType() = default;
-
-  const T& Get() const noexcept
-  {
-    return mValue;
-  }
-
-  T& Get() noexcept
-  {
-    return mValue;
-  }
-
-  const T& operator*() const noexcept
-  {
-    return mValue;
-  }
-
-  T& operator*() noexcept
-  {
-    return mValue;
-  }
-
-private:
-  T mValue;
-};
-
-template<typename T, typename Tag>
-std::ostream& operator<<( std::ostream& os, const StrongType<T, Tag>& value )
-{
-  os << value.Get();
-  return os;
-}
-
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_UTILITY_STRONG_TYPE_H
\ No newline at end of file
diff --git a/dali/graphics-api/utility/utility-synchronized.h b/dali/graphics-api/utility/utility-synchronized.h
deleted file mode 100644 (file)
index b22b03c..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef DALI_GRAPHICS_SYNCHRONIZED_H
-#define DALI_GRAPHICS_SYNCHRONIZED_H
-
-/*
- * Copyright (c) 2018 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <memory>
-#include <mutex>
-#include <thread>
-#include <utility>
-
-namespace Dali
-{
-namespace Graphics
-{
-namespace Utility
-{
-/**
- * @brief Class that encapsulates object for thread-safe access
- */
-template < typename T >
-class Synchronized final
-{
-public:
-  template < typename... Args >
-  Synchronized( Args... args )
-  : mMutex(std::make_unique<std::mutex>()),
-    mObject( std::forward< Args >( args )... )
-  {
-  }
-
-  Synchronized( const Synchronized& ) = delete;
-  Synchronized& operator=( const Synchronized& ) = delete;
-  Synchronized( Synchronized&& ) = default;
-  Synchronized& operator=( Synchronized&& ) = default;
-  virtual ~Synchronized() = default;
-
-  /**
-   * @brief Handle to access the data in the Synchronized object
-   */
-  class Handle final
-  {
-  public:
-    Handle(const Handle&) = delete;
-    Handle& operator=(const Handle&) = delete;
-    Handle(Handle&&) = default;
-    Handle& operator=(Handle&&) = default;
-    ~Handle()
-    {
-      mMutex.unlock();
-    }
-
-    T& operator*()
-    {
-      return mObjectRef;
-    }
-
-    const T& operator*() const
-    {
-      return mObjectRef;
-    }
-
-    T& operator->()
-    {
-      return mObjectRef;
-    }
-
-    const T& operator->() const
-    {
-      return mObjectRef;
-    }
-
-    T* operator&()
-    {
-      return &mObjectRef;
-    }
-
-    const T* operator&() const
-    {
-      return &mObjectRef;
-    }
-
-  private:
-    friend Synchronized; //< Allow Synchronized to create a handle
-    Handle( std::mutex& mutex, T& object )
-    : mMutex( mutex ),
-      mObjectRef( object )
-    {
-      mMutex.lock();
-    }
-
-    std::mutex& mMutex;
-    T& mObjectRef;
-  };
-
-  Handle Lock() {
-    return Handle(*mMutex, mObject);
-  }
-
-private:
-  std::unique_ptr< std::mutex > mMutex; //< Mutex to guard access to the object
-  T mObject;                            //< Memeber object that stores the data
-};
-
-template < typename T, typename... Args >
-Synchronized< T > MakeSynchronized( Args... args )
-{
-  return Synchronized< T >( std::forward< Args >( args )... );
-}
-
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif //DALI_GRAPHICS_SYNCHRONIZED_H
\ No newline at end of file
diff --git a/dali/graphics-api/utility/utility-traits.h b/dali/graphics-api/utility/utility-traits.h
deleted file mode 100644 (file)
index 6343a3e..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef DALI_GRAPHICS_UTILITY_TRAITS_H
-#define DALI_GRAPHICS_UTILITY_TRAITS_H
-
-/*
- * Copyright (c) 2018 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <memory>
-#include <type_traits>
-
-namespace Dali
-{
-namespace Graphics
-{
-namespace Utility
-{
-
-template<typename T>
-struct BasicType
-{
-  using StorageT = T;
-  using AccessT  = T;
-  using ValueT   = T;
-};
-
-template<typename T>
-struct ComplexType
-{
-  using StorageT = T;
-  using AccessT  = const T&;
-  using ValueT   = T;
-};
-
-template<typename T, template<typename...> class Ptr, typename...Ts>
-struct SmartPointerType
-{
-  using StorageT = Ptr<T, Ts...>;
-  using AccessT  = T&;
-  using ValueT   = T;
-};
-
-// Default types
-template<typename T> struct TraitsType : ComplexType<T> {};
-
-// Pointer types
-template<typename T, typename D>
-struct TraitsType<std::unique_ptr<T, D>> : SmartPointerType<T, std::unique_ptr, D>
-{
-};
-template<typename T>
-struct TraitsType<std::shared_ptr<T>> : SmartPointerType<T, std::shared_ptr>
-{
-};
-
-// Basic types
-template<> struct TraitsType<signed char> : BasicType<signed char> { };
-template<> struct TraitsType<unsigned char> : BasicType<unsigned char> { };
-template<> struct TraitsType<signed short> : BasicType<signed short> { };
-template<> struct TraitsType<unsigned short> : BasicType<unsigned short> { };
-template<> struct TraitsType<signed long> : BasicType<signed long> { };
-template<> struct TraitsType<unsigned long> : BasicType<unsigned long> { };
-template<> struct TraitsType<signed long long> : BasicType<signed long long> { };
-template<> struct TraitsType<unsigned long long> : BasicType<unsigned long long> { };
-template<> struct TraitsType<float> : BasicType<float> { };
-template<> struct TraitsType<double> : BasicType<double> { };
-
-// Invalid tyoes
-
-template<typename T> struct TraitsType<T*> {};
-template<typename T> struct TraitsType<const T*> {};
-template<typename T> struct TraitsType<T&> {};
-template<typename T> struct TraitsType<const T&> {};
-
-} // namespace Utility
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_UTILITY_TRAITS_H
\ No newline at end of file