/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
#define END_TEST \
return ((test_return_value>0)?1:0)
+extern "C"
+{
void tet_infoline(const char* str)
{
vfprintf(stderr, format, arg);
va_end(arg);
}
+}
+
bool operator==(TimePeriod a, TimePeriod b)
{
}
}
-BufferImage CreateBufferImage(int32_t width, int32_t height, const Vector4& color)
-{
- BufferImage image = BufferImage::New(width, height, Pixel::RGBA8888);
-
- PixelBuffer* pixbuf = image.GetBuffer();
-
- // Using a 4x4 image gives a better blend with the GL implementation
- // than a 3x3 image
- for(size_t i=0; i<16; i++)
- {
- pixbuf[i*4+0] = color.r*255;
- pixbuf[i*4+1] = color.g*255;
- pixbuf[i*4+2] = color.b*255;
- pixbuf[i*4+3] = color.a*255;
- }
-
- return image;
-}
-
-BufferImage CreateBufferImage()
-{
- return CreateBufferImage(4, 4, Color::WHITE);
-}
-
-void PrepareResourceImage( TestApplication& application, uint32_t imageWidth, uint32_t imageHeight, Pixel::Format pixelFormat )
-{
- TestPlatformAbstraction& platform = application.GetPlatform();
- platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
-
- Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
- Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
- uint32_t bytesPerPixel = GetBytesPerPixel( pixelFormat );
- uint32_t initialColor = 0xFF;
- memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
-
- Integration::ResourcePointer resourcePtr(bitmap);
- platform.SetSynchronouslyLoadedResource( resourcePtr );
-}
-
namespace Test
{
bool& refObjectDestroyedBoolean;
};
-ObjectDestructionTracker::ObjectDestructionTracker()
- :mRefObjectDestroyed( false)
+ObjectDestructionTracker::ObjectDestructionTracker( ObjectRegistry objectRegistry )
+: mObjectRegistry( objectRegistry ),
+ mRefObjectDestroyed( false)
{
}
void ObjectDestructionTracker::Start( Actor actor )
{
ObjectDestructionFunctor destructionFunctor( actor.GetObjectPtr(), mRefObjectDestroyed );
-
- ObjectRegistry objectRegistry = Stage::GetCurrent().GetObjectRegistry();
- objectRegistry.ObjectDestroyedSignal().Connect( this, destructionFunctor );
+ mObjectRegistry.ObjectDestroyedSignal().Connect( this, destructionFunctor );
}
bool ObjectDestructionTracker::IsDestroyed()