Cleanup ResourceLoading and PlatformAbstraction 83/129983/3
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Thu, 18 May 2017 17:06:10 +0000 (18:06 +0100)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Wed, 24 May 2017 16:40:09 +0000 (17:40 +0100)
- Cleanup in PlatformAbstraction
- Cleaned up code and comments

Change-Id: Iabb992ceb71e865de27588c8a8affd8de002922a

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp

index b177e4a..cb0b39c 100644 (file)
@@ -25,7 +25,6 @@ namespace Dali
 TestPlatformAbstraction::TestPlatformAbstraction()
 : mTrace(),
   mIsLoadingResult( false ),
-  mSize(),
   mClosestSize(),
   mLoadFileResult(),
   mSaveFileResult( false ),
@@ -60,13 +59,13 @@ ImageDimensions TestPlatformAbstraction::GetClosestImageSize( Integration::Resou
   return closestSize;
 }
 
-Integration::ResourcePointer TestPlatformAbstraction::LoadResourceSynchronously( const Integration::ResourceType& resourceType, const std::string& resourcePath )
+Integration::ResourcePointer TestPlatformAbstraction::LoadImageSynchronously( const Integration::BitmapResourceType& resourceType, const std::string& resourcePath )
 {
   mTrace.PushCall("LoadResourceSynchronously", "");
   return mSynchronouslyLoadedResource;
 }
 
-Integration::BitmapPtr TestPlatformAbstraction::DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size )
+Integration::BitmapPtr TestPlatformAbstraction::DecodeBuffer( const Integration::BitmapResourceType& resourceType, uint8_t * buffer, size_t size )
 {
   mTrace.PushCall("DecodeBuffer", "");
   return mDecodedBitmap;
index 230ed02..201e29d 100644 (file)
@@ -26,6 +26,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/platform-abstraction.h>
+#include <dali/public-api/math/vector2.h>
 
 #include "test-trace-call-stack.h"
 
@@ -71,12 +72,12 @@ public:
   /**
    * @copydoc PlatformAbstraction::LoadResourceSynchronously()
    */
-  virtual Integration::ResourcePointer LoadResourceSynchronously( const Integration::ResourceType& resourceType, const std::string& resourcePath );
+  virtual Integration::ResourcePointer LoadImageSynchronously( const Integration::BitmapResourceType& resourceType, const std::string& resourcePath );
 
   /**
    * @copydoc PlatformAbstraction::DecodeBuffer()
    */
-  virtual Integration::BitmapPtr DecodeBuffer( const Dali::Integration::ResourceType& resourceType, uint8_t * buffer, size_t size );
+  virtual Integration::BitmapPtr DecodeBuffer( const Dali::Integration::BitmapResourceType& resourceType, uint8_t * buffer, size_t size );
 
   /**
    * @copydoc PlatformAbstraction::LoadShaderBinaryFile()
@@ -176,7 +177,6 @@ private:
 
   mutable TraceCallStack        mTrace;
   bool                          mIsLoadingResult;
-  Vector2                       mSize;
   Vector2                       mClosestSize;
 
   LoadFileResult                mLoadFileResult;
@@ -188,4 +188,4 @@ private:
 
 } // Dali
 
-#endif /* __DALI_TET_PLATFORM_ABSTRACTION_H__ */
+#endif /* __DALI_TEST_PLATFORM_ABSTRACTION_H__ */
index 27c91e2..f589f41 100644 (file)
@@ -704,7 +704,6 @@ void ImageVisual::InitializeRenderer( const Image& image )
   // don't reuse CreateTextureSet
   TextureSet textures = TextureSet::New();
 
-  // Renderer can't be shared if mImage is NativeImage
   NativeImage nativeImage = NativeImage::DownCast( image );
   if( nativeImage )
   {
index 599546f..1df32a6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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 "npatch-visual.h"
 
 // EXTERNAL INCLUDES
-#include <dali/integration-api/platform-abstraction.h>
 #include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/images/texture-set-image.h>
+#include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>