mTrace.PushCall("Resume", "");
}
-void TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
- const ImageAttributes& attributes,
- Vector2& closestSize)
+ImageDimensions TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
+ ImageDimensions size,
+ FittingMode::Type fittingMode,
+ SamplingMode::Type samplingMode,
+ bool orientationCorrection )
{
- closestSize = mClosestSize;
+ ImageDimensions closestSize = ImageDimensions( mClosestSize.x, mClosestSize.y );
mTrace.PushCall("GetClosestImageSize", "");
+ return closestSize;
}
-void TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
- const ImageAttributes& attributes,
- Vector2& closestSize)
+ImageDimensions TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
+ ImageDimensions size,
+ FittingMode::Type fittingMode,
+ SamplingMode::Type samplingMode,
+ bool orientationCorrection )
{
- closestSize = mClosestSize;
+ ImageDimensions closestSize = ImageDimensions( mClosestSize.x, mClosestSize.y );
mTrace.PushCall("GetClosestImageSize", "");
+ return closestSize;
}
/**
void TestPlatformAbstraction::LoadResource(const Integration::ResourceRequest& request)
{
std::ostringstream out;
- out << "Type:" << request.GetType()->id << ", Path: " << request.GetPath() << std::endl;
+ out << "Type:" << request.GetType()->id << ", Path: " << request.GetPath() << std::endl ;
mTrace.PushCall("LoadResource", out.str());
if(mRequest != NULL)
return mResources.loadedResource;
}
-/**
- * @copydoc PlatformAbstraction::SaveResource()
- */
-void TestPlatformAbstraction::SaveResource(const Integration::ResourceRequest& request)
+Integration::BitmapPtr TestPlatformAbstraction::DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size )
{
- mTrace.PushCall("SaveResource", "");
- if(mRequest != NULL)
- {
- delete mRequest;
- tet_infoline ("Warning: multiple resource requests not handled by Test Suite. You may see unexpected errors");
- }
- mRequest = new Integration::ResourceRequest(request);
+ mTrace.PushCall("DecodeBuffer", "");
+ return Integration::BitmapPtr();
}
/**
{
cache.LoadFailed( mResources.loadFailedId, mResources.loadFailure );
}
- if(mResources.saved)
- {
- cache.SaveComplete( mResources.savedId, mResources.savedType );
- }
- if(mResources.saveFailed)
- {
- cache.SaveFailed( mResources.saveFailedId, mResources.saveFailure );
- }
}
/**
}
/**
- * @copydoc PlatformAbstraction::GetDefaultFontDescription()
- */
-void TestPlatformAbstraction::GetDefaultFontDescription( std::string& family, std::string& style ) const
-{
- // TODO
-}
-
-/**
* @copydoc PlatformAbstraction::GetDefaultFontSize()
*/
int TestPlatformAbstraction::GetDefaultFontSize() const
/**
* @copydoc PlatformAbstraction::LoadFile()
*/
-bool TestPlatformAbstraction::LoadFile( const std::string& filename, std::vector< unsigned char >& buffer ) const
+bool TestPlatformAbstraction::LoadFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const
{
mTrace.PushCall("LoadFile", "");
if( mLoadFileResult.loadResult )
}
/**
- * @copydoc PlatformAbstraction::LoadShaderBinFile()
+ * @copydoc PlatformAbstraction::LoadShaderBinaryFile()
*/
-bool TestPlatformAbstraction::LoadShaderBinFile( const std::string& filename, std::vector< unsigned char >& buffer ) const
+bool TestPlatformAbstraction::LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const
{
- mTrace.PushCall("LoadShaderBinFile", "");
+ mTrace.PushCall("LoadShaderBinaryFile", "");
if( mLoadFileResult.loadResult )
{
buffer = mLoadFileResult.buffer;
/**
* @copydoc PlatformAbstraction::SaveFile()
*/
-bool TestPlatformAbstraction::SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const
+bool TestPlatformAbstraction::SaveFile(const std::string& filename, const unsigned char * buffer, unsigned int numBytes) const
{
mTrace.PushCall("SaveFile", "");
return false;
mTrace.PushCall("JoinLoaderThreads", "");
}
-Integration::DynamicsFactory* TestPlatformAbstraction::GetDynamicsFactory()
-{
- mTrace.PushCall("GetDynamicsFactory", "");
- return NULL;
-}
-
/** Call this every test */
void TestPlatformAbstraction::Initialize()
{
case SuspendFunc: return mTrace.FindMethod("Suspend");
case ResumeFunc: return mTrace.FindMethod("Resume");
case LoadResourceFunc: return mTrace.FindMethod("LoadResource");
- case SaveResourceFunc: return mTrace.FindMethod("SaveResource");
case LoadFileFunc: return mTrace.FindMethod("LoadFile");
- case LoadShaderBinFileFunc: return mTrace.FindMethod("LoadShaderBinFile");
+ case LoadShaderBinaryFileFunc: return mTrace.FindMethod("LoadShaderBinaryFile");
+ case SaveShaderBinaryFileFunc: return mTrace.FindMethod("SaveShaderBinaryFile");
case SaveFileFunc: return mTrace.FindMethod("SaveFile");
case CancelLoadFunc: return mTrace.FindMethod("CancelLoad");
case GetResourcesFunc: return mTrace.FindMethod("GetResources");
case IsLoadingFunc: return mTrace.FindMethod("IsLoading");
case SetDpiFunc: return mTrace.FindMethod("SetDpi");
case JoinLoaderThreadsFunc: return mTrace.FindMethod("JoinLoaderThreads");
- case GetDynamicsFactoryFunc: return mTrace.FindMethod("GetDynamicsFactory");
}
return false;
}
mResources.loadFailure = failure;
}
-void TestPlatformAbstraction::SetResourceSaved(Integration::ResourceId savedId,
- Integration::ResourceTypeId savedType)
-{
- mResources.saved = true;
- mResources.savedId = savedId;
- mResources.savedType = savedType;
-}
-
-void TestPlatformAbstraction::SetResourceSaveFailed(Integration::ResourceId id,
- Integration::ResourceFailure failure)
-{
- mResources.saveFailed = true;
- mResources.saveFailedId = id;
- mResources.saveFailure = failure;
-}
-
Integration::ResourceRequest* TestPlatformAbstraction::GetRequest()
{
return mRequest;
mClosestSize = size;
}
-void TestPlatformAbstraction::SetLoadFileResult( bool result, std::vector< unsigned char >& buffer )
+void TestPlatformAbstraction::SetLoadFileResult( bool result, Dali::Vector< unsigned char >& buffer )
{
mLoadFileResult.loadResult = result;
if( result )