Revert "Convert texture's gl format (from dali-core)." 58/201558/1
authorRichard Huang <r.huang@samsung.com>
Fri, 15 Mar 2019 14:01:45 +0000 (14:01 +0000)
committerRichard Huang <r.huang@samsung.com>
Fri, 15 Mar 2019 14:01:45 +0000 (14:01 +0000)
This reverts commit 3e4e3a90958d12d6a8daac2eb68a5d4ed9539040.

Change-Id: Iaca2518f5c8fa326729297ad550fa819a8150da2

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h
dali/internal/graphics/gles/gl-implementation.h

index 44c6a33..02439bc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -104,10 +104,6 @@ void TestGlAbstraction::PostRender()
 {
 }
 
-void TestGlAbstraction::ConvertTexture( uint8_t* buffer, GLenum& imageGlFormat, const uint32_t dataSize, const GLenum textureGlFormat, const bool isSubImage )
-{
-}
-
 } // Namespace dali
 
 bool BlendEnabled(const Dali::TraceCallStack& callStack)
index c69e4e3..c68573b 100644 (file)
@@ -2,7 +2,7 @@
 #define TEST_GL_ABSTRACTION_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -59,8 +59,6 @@ public:
   void PreRender();
   void PostRender();
 
-  void ConvertTexture( uint8_t* buffer, GLenum& imageGlFormat, const uint32_t dataSize, const GLenum textureGlFormat, const bool isSubImage );
-
   /* OpenGL ES 2.0 */
 
   inline void ActiveTexture( GLenum textureUnit )
index 1c12bd2..b1ce82d 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -67,35 +67,6 @@ public:
     /* Do nothing in main implementation */
   }
 
-  void ConvertTexture( uint8_t* buffer, GLenum& imageGlFormat, const uint32_t dataSize, const GLenum textureGlFormat, const bool isSubImage )
-  {
-    bool convert = ( ( imageGlFormat == GL_RGB ) && ( textureGlFormat == GL_RGBA ) );
-#if DALI_GLES_VERSION >= 30
-    // Don't convert manually from RGB to RGBA if GLES >= 3.0 and a sub-image is uploaded.
-    convert = convert && !isSubImage;
-#endif // DALI_GLES_VERSION >= 30
-
-    if( convert )
-    {
-      //This buffer is only used if manually converting from RGB to RGBA
-      uint8_t* tempBuffer(0);
-
-      tempBuffer = new uint8_t[dataSize*4u];
-      for( uint32_t i = 0u; i < dataSize; ++i )
-      {
-        tempBuffer[i*4u]   = buffer[i*3u];
-        tempBuffer[i*4u+1] = buffer[i*3u+1];
-        tempBuffer[i*4u+2] = buffer[i*3u+2];
-        tempBuffer[i*4u+3] = 0xFF;
-      }
-      buffer = tempBuffer;
-      imageGlFormat = textureGlFormat; // Set the glFormat to GL_RGBA
-
-      //Destroy temp buffer used for conversion RGB->RGBA
-      delete[] tempBuffer;
-    }
-  }
-
   /* OpenGL ES 2.0 */
 
   void ActiveTexture (GLenum texture)