The hover event now starts in the STARTED state when a new actor is encountered.
[platform/core/uifw/dali-core.git] / dali / integration-api / bitmap.cpp
index 5f6a013..70db04b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -36,7 +36,7 @@ using namespace Dali::Pixel;
 void ConvertToGlFormat(Format pixelformat, unsigned& pixelDataType, unsigned& internalFormat)
 {
   // Compressed textures have no pixelDataType, so init to an invalid value:
-  pixelDataType = -1;
+  pixelDataType = GL_INVALID_VALUE;
 
   switch(pixelformat)
   {
@@ -450,6 +450,20 @@ void ConvertToGlFormat(Format pixelformat, unsigned& pixelDataType, unsigned& in
       break;
     }
 
+    // Chrominance formats
+    case Pixel::CHROMINANCE_U:
+    {
+      pixelDataType  = GL_UNSIGNED_BYTE;
+      internalFormat = GL_LUMINANCE; // GL doesn't support chrominance format. We should convert it in the shader.
+      break;
+    }
+    case Pixel::CHROMINANCE_V:
+    {
+      pixelDataType  = GL_UNSIGNED_BYTE;
+      internalFormat = GL_LUMINANCE; // GL doesn't support chrominance format. We should convert it in the shader.
+      break;
+    }
+
     case INVALID:
     {
       DALI_LOG_ERROR("Invalid pixel format for bitmap\n");