/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// initialise handle
image = FrameBufferImage::New(); // create framebuffer with the same dimensions as the stage
- ImageActor actor=ImageActor::New(image);
+ Actor actor = CreateRenderableActor( image );
Stage::GetCurrent().Add(actor);
application.SendNotification();
DALI_TEST_EQUALS((float)image.GetHeight(), stageSize.height, TEST_LOCATION);
image = FrameBufferImage::New(16, 16); // create framebuffer with dimensions of 16x16
- actor.SetImage(image);
-
- application.SendNotification();
- application.Render();
- application.Render();
- application.SendNotification();
DALI_TEST_CHECK( image );
DALI_TEST_EQUALS(image.GetWidth(), 16u, TEST_LOCATION);
DALI_TEST_CHECK( !image );
- // initialise handle with UNUSED release policy
- image = FrameBufferImage::New(*(nativeImage.Get()), Image::UNUSED);
-
- DALI_TEST_CHECK( image );
-
- //ReleasePolicy is always never for framebuffer images
- DALI_TEST_EQUALS( image.GetReleasePolicy(), Image::NEVER, TEST_LOCATION );
-
- // initialise handle with NEVER release policy
- image.Reset();
- DALI_TEST_CHECK( !image );
-
- image = FrameBufferImage::New(*(nativeImage.Get()), Image::NEVER);
+ // initialise handle
+ image = FrameBufferImage::New(*(nativeImage.Get()));
DALI_TEST_CHECK( image );
- //ReleasePolicy is always never for framebuffer images
- DALI_TEST_EQUALS( image.GetReleasePolicy(), Image::NEVER, TEST_LOCATION );
-
END_TEST;
}
// initialise handle
image = FrameBufferImage::New(64, 64, Pixel::RGBA8888, RenderBuffer::COLOR); // create framebuffer with Color buffer
- ImageActor actor=ImageActor::New(image);
+ Actor actor = CreateRenderableActor(image);
Stage::GetCurrent().Add(actor);
application.SendNotification();
// initialise handle
image = FrameBufferImage::New(64, 64, Pixel::RGBA8888, RenderBuffer::COLOR_DEPTH); // create framebuffer with Color and Depth buffer
- ImageActor actor=ImageActor::New(image);
+ Actor actor = CreateRenderableActor(image);
Stage::GetCurrent().Add(actor);
application.SendNotification();
// initialise handle
image = FrameBufferImage::New(64, 64, Pixel::RGBA8888, RenderBuffer::COLOR_STENCIL); // create framebuffer with Color and Stencil
- ImageActor actor=ImageActor::New(image);
+ Actor actor = CreateRenderableActor(image);
Stage::GetCurrent().Add(actor);
application.SendNotification();
// initialise handle
image = FrameBufferImage::New(64, 64, Pixel::RGBA8888, RenderBuffer::COLOR_DEPTH_STENCIL); // create framebuffer with Color, Depth and Stencil buffers
- ImageActor actor=ImageActor::New(image);
+ Actor actor = CreateRenderableActor(image);
Stage::GetCurrent().Add(actor);
application.SendNotification();