DSRenderEngineDaliImpl: Added properties to actor. 43/241743/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Wed, 5 Aug 2020 06:30:16 +0000 (15:30 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 10:09:59 +0000 (19:09 +0900)
Change-Id: Ic5b7cb40c03baf052bbc2ef9f6398bcef909b6a5
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/DSRender/DSRenderEngineDaliImpl.cpp
src/DSRender/DSRenderViewDaliImpl.cpp

index c61a8e3..ccc053a 100644 (file)
@@ -2,6 +2,8 @@
 #include "DSRenderViewDaliImpl.h"
 #include "DSDebugLog.h"
 
+#include <dali/devel-api/actors/actor-devel.h>
+
 #include <tbm_surface_queue.h>
 
 using namespace Dali;
@@ -32,6 +34,11 @@ void DSRenderEngineDaliImpl::onInitialize()
 
        Toolkit::TextLabel textlabel = Toolkit::TextLabel::New("Hello libDS");
        textlabel.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER);
+       textlabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+    textlabel.SetProperty(Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
+    textlabel.SetProperty(Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
+    textlabel.SetProperty(Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE);
+    textlabel.SetProperty(Toolkit::TextLabel::Property::POINT_SIZE, 30.f);
        window.Add(textlabel);
        /* for testing -- end -- */
 }
index 55dcd14..23536c9 100644 (file)
@@ -1,4 +1,5 @@
 #include "DSRenderViewDaliImpl.h"
+#include <tbm_surface.h>
 
 using namespace Dali;
 
@@ -70,6 +71,14 @@ DSRenderViewDaliImpl::DSRenderViewDaliImpl(std::shared_ptr<DSWindow> window, Dal
        __textureViewActor = Actor::New();
 
        __textureViewActor.AddRenderer(__renderer);
+
+       // belows for testing //
+       __textureViewActor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+       __textureViewActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER);
+       __textureViewActor.SetProperty(Actor::Property::POSITION, Vector3( 0.0f, 100.f, 0.0f ));
+    __textureViewActor.SetProperty(Actor::Property::SIZE, Vector2(500, 500));
+
+
        offscreenWindow.Add(__textureViewActor);
 }
 
@@ -79,7 +88,7 @@ DSRenderViewDaliImpl::~DSRenderViewDaliImpl()
 
 bool DSRenderViewDaliImpl::setBuffer(std::shared_ptr<IDSBuffer> buffer)
 {
-       void *nativeBuffer = buffer->getNativeBuffer();
+       tbm_surface_h nativeBuffer = (tbm_surface_h)buffer->getNativeBuffer();
 
        NativeImageSourcePtr nativeImageSource = NativeImageSource::New(Any(nativeBuffer));