[Tizen] Using Depth and Stencil buffer & texture
[platform/core/uifw/dali-core.git] / dali / public-api / images / pixel.h
index 49abf46..c03d9df 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_PIXEL_H__
-#define __DALI_PIXEL_H__
+#ifndef DALI_PIXEL_H
+#define DALI_PIXEL_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.
@@ -18,6 +18,9 @@
  *
  */
 
+// EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
@@ -111,6 +114,10 @@ enum Format
   RGB16F, ///< Color depth 48-bit, 16-16-16 half floating point. @SINCE_1_2.60
   RGB32F, ///< Color depth 96-bit, 32-32-32 floating point. @SINCE_1_2.60
 
+  DEPTH_UNSIGNED_INT, ///< Unsigned int depth format 32-bit. @SINCE_1_5_9
+  DEPTH_FLOAT, ///< Float depth format 32-bit. @SINCE_1_5_9
+
+  DEPTH_STENCIL ///< Depth stencil 32-bit, 24 bit for depth, 8 bit for stencil. @SINCE_1_5_9
   ///! Update LAST_VALID_PIXEL_FORMAT below if you add an enum value here.
 };
 
@@ -126,7 +133,7 @@ const Format FIRST_VALID_PIXEL_FORMAT = A8;
  *
  * Sync it to the last value above.
  */
-const Format LAST_VALID_PIXEL_FORMAT = RGB32F;
+const Format LAST_VALID_PIXEL_FORMAT = DEPTH_STENCIL;
 
 /**
  * @brief Whether specified pixel format contains an alpha value.
@@ -135,7 +142,7 @@ const Format LAST_VALID_PIXEL_FORMAT = RGB32F;
  * @param[in] pixelformat Pixel format
  * @return @c true if format has alpha, @c false otherwise
  */
-DALI_IMPORT_API bool HasAlpha(Format pixelformat);
+DALI_CORE_API bool HasAlpha(Format pixelformat);
 
 /**
  * @brief Returns The number of bytes per pixel for the specified pixel format.
@@ -144,7 +151,7 @@ DALI_IMPORT_API bool HasAlpha(Format pixelformat);
  * @param[in] pixelFormat The pixel format
  * @return The number of bytes per pixel
  */
-DALI_IMPORT_API unsigned int GetBytesPerPixel(Format pixelFormat);
+DALI_CORE_API uint32_t GetBytesPerPixel(Format pixelFormat);
 
 /**
  * @brief Returns the offset of the byte containing the alpha value from the start of the pixel data
@@ -160,7 +167,7 @@ DALI_IMPORT_API unsigned int GetBytesPerPixel(Format pixelFormat);
  * @param[out] bitMask The bitmask of the byte to get the alpha value
  *
  */
-DALI_IMPORT_API void GetAlphaOffsetAndMask(Format pixelFormat, int& byteOffset, int& bitMask);
+DALI_CORE_API void GetAlphaOffsetAndMask(Format pixelFormat, int& byteOffset, int& bitMask);
 
 } //namespace Pixel
 
@@ -169,4 +176,4 @@ DALI_IMPORT_API void GetAlphaOffsetAndMask(Format pixelFormat, int& byteOffset,
  */
 } // namespace Dali
 
-#endif // __DALI_PIXEL_H__
+#endif // DALI_PIXEL_H