Add Pixel format for depth and stencil 21/178121/6
authorSeungho, Baek <sbsh.baek@samsung.com>
Tue, 8 May 2018 07:27:13 +0000 (16:27 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Thu, 16 Apr 2020 03:49:05 +0000 (12:49 +0900)
 - add cases on the switch to control pixel enum

Change-Id: I19a6d9abc010cfc434e282b5af1245ed68541c5c
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
dali/internal/imaging/common/pixel-manipulation.cpp
dali/internal/imaging/common/pixel-manipulation.h

index e37c88e..eaaca10 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
@@ -82,6 +82,17 @@ bool HasChannel( Dali::Pixel::Format pixelFormat, Channel channel )
       return ( channel == RED || channel == GREEN || channel == BLUE || channel == ALPHA );
     }
 
+    case Dali::Pixel::DEPTH_UNSIGNED_INT:
+    case Dali::Pixel::DEPTH_FLOAT:
+    {
+      return ( channel == DEPTH );
+    }
+
+    case Dali::Pixel::DEPTH_STENCIL:
+    {
+      return ( channel == DEPTH || channel == STENCIL );
+    }
+
     case Dali::Pixel::INVALID:
     case Dali::Pixel::COMPRESSED_R11_EAC:
     case Dali::Pixel::COMPRESSED_SIGNED_R11_EAC:
@@ -367,6 +378,13 @@ unsigned int ReadChannel( unsigned char* pixelData,
       else return 0u;
     }
 
+    case Dali::Pixel::DEPTH_UNSIGNED_INT:
+    case Dali::Pixel::DEPTH_FLOAT:
+    case Dali::Pixel::DEPTH_STENCIL:
+    {
+      return 0u;
+    }
+
     default:
     {
       return 0u;
@@ -640,6 +658,13 @@ void WriteChannel( unsigned char* pixelData,
       break;
     }
 
+    case Dali::Pixel::DEPTH_UNSIGNED_INT:
+    case Dali::Pixel::DEPTH_FLOAT:
+    case Dali::Pixel::DEPTH_STENCIL:
+    {
+      break;
+    }
+
     default:
       break;
   }
index 611b5a6..99c23e9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_ADAPTOR_PIXEL_MANIPULATION_H
 
 /*
- * Copyright (c) 2017 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.
@@ -35,6 +35,8 @@ enum Channel
   GREEN,
   BLUE,
   ALPHA,
+  DEPTH,
+  STENCIL,
   MAX_NUMBER_OF_CHANNELS
 };