(Partial update) The color property should be checked 06/237406/2
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 30 Jun 2020 05:51:07 +0000 (14:51 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 6 Jul 2020 02:02:43 +0000 (02:02 +0000)
Change-Id: If9f649a2312dd39fa6709b82a0e16292de23560b

automated-tests/src/dali/utc-Dali-Actor.cpp
dali/internal/render/common/render-item.cpp
dali/internal/render/common/render-item.h
dali/internal/update/manager/render-instruction-processor.cpp

index 09ee3c7..6c3f4a3 100644 (file)
@@ -7649,6 +7649,12 @@ int utcDaliActorPartialUpdateSetColor(void)
   DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
   DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
 
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
   // 2. Set new color
   actor.SetProperty(Actor::Property::COLOR, Vector3(1.0f, 0.0f, 0.0f));
   application.SendNotification();
index d10e15e..c218b25 100644 (file)
@@ -45,6 +45,7 @@ RenderItem* RenderItem::New()
 RenderItem::RenderItem()
 : mModelMatrix( false ),
   mModelViewMatrix( false ),
+  mColor( Vector4::ZERO ),
   mSize(),
   mRenderer( NULL ),
   mNode( NULL ),
index 77e1fac..47fc386 100644 (file)
@@ -78,6 +78,7 @@ struct RenderItem
 
   Matrix            mModelMatrix;
   Matrix            mModelViewMatrix;
+  Vector4           mColor;
   Vector3           mSize;
   Vector3           mUpdateSize;
   Render::Renderer* mRenderer;
index 37f9236..b973fa9 100644 (file)
@@ -184,6 +184,10 @@ inline void AddRendererToRenderList(BufferIndex updateBufferIndex,
       item.mIsOpaque = (opacityType == Renderer::OPAQUE);
       item.mIsUpdated |= (prevIsOpaque != item.mIsOpaque);
 
+      Vector4 prevColor = item.mColor;
+      item.mColor = renderable.mNode->GetColor(updateBufferIndex);
+      item.mIsUpdated |= (prevColor != item.mColor);
+
       int prevDepthIndex = item.mDepthIndex;
       item.mDepthIndex = 0;
       if (!isLayer3d)