[4.0] Fix blending factor for premultiplied alpha format 71/170871/1
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 21 Feb 2018 02:03:23 +0000 (11:03 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 23 Feb 2018 03:51:07 +0000 (12:51 +0900)
Change-Id: I8030e1bd05a69d8afa06d2d0da12f40fc3f3d8d7

automated-tests/src/dali/utc-Dali-Renderer.cpp
dali/internal/event/rendering/renderer-impl.cpp

index 9ea907d..021349f 100644 (file)
@@ -956,7 +956,7 @@ int UtcDaliRendererPreMultipledAlpha(void)
   DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 srcFactorRgb,    TEST_LOCATION );
   DALI_TEST_EQUALS( (int)BlendFactor::ONE_MINUS_SRC_ALPHA, destFactorRgb,   TEST_LOCATION );
   DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 srcFactorAlpha,  TEST_LOCATION );
-  DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 destFactorAlpha, TEST_LOCATION );
+  DALI_TEST_EQUALS( (int)BlendFactor::ONE_MINUS_SRC_ALPHA, destFactorAlpha, TEST_LOCATION );
 
   DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uColor", actualValue ) );
   DALI_TEST_EQUALS( actualValue, Vector4(0.5f, 0.0f, 0.5f, 0.5f), TEST_LOCATION );
index 62c517c..35431d5 100644 (file)
@@ -315,7 +315,7 @@ void Renderer::EnablePreMultipliedAlpha( bool preMultipled )
   {
     if( preMultipled )
     {
-      SetBlendFunc( BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::ONE );
+      SetBlendFunc( BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA );
     }
     mPremultipledAlphaEnabled = preMultipled;
     SetEnablePreMultipliedAlphaMessage( GetEventThreadServices(), *mSceneObject, mPremultipledAlphaEnabled );