Use modern construct 'using' instead of typedef.
[platform/core/uifw/dali-core.git] / dali / integration-api / gl-abstraction.h
index a5d81f3..bffcd67 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTEGRATION_GL_ABSTRACTION_H__
-#define __DALI_INTEGRATION_GL_ABSTRACTION_H__
+#ifndef DALI_INTEGRATION_GL_ABSTRACTION_H
+#define DALI_INTEGRATION_GL_ABSTRACTION_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -60,30 +60,30 @@ namespace Dali
 
 /* OpenGL ES 2.0 */
 
-typedef void             GLvoid;
-typedef char             GLchar;
-typedef unsigned int     GLenum;
-typedef unsigned char    GLboolean;
-typedef unsigned int     GLbitfield;
-typedef int8_t           GLbyte;
-typedef short            GLshort;
-typedef int              GLint;
-typedef int              GLsizei;
-typedef uint8_t          GLubyte;
-typedef unsigned short   GLushort;
-typedef unsigned int     GLuint;
-typedef float            GLfloat;
-typedef float            GLclampf;
-typedef int              GLfixed;
-typedef signed long int  GLintptr;
-typedef signed long int  GLsizeiptr;
+using GLvoid     = void;
+using GLchar     = char;
+using GLenum     = unsigned int;
+using GLboolean  = unsigned char;
+using GLbitfield = unsigned int;
+using GLbyte     = int8_t;
+using GLshort    = short;
+using GLint      = int;
+using GLsizei    = int;
+using GLubyte    = uint8_t;
+using GLushort   = unsigned short;
+using GLuint     = unsigned int;
+using GLfloat    = float;
+using GLclampf   = float;
+using GLfixed    = int;
+using GLintptr   = long;
+using GLsizeiptr = long;
 
 /* OpenGL ES 3.0 */
 
-typedef unsigned short     GLhalf;
-typedef int64_t            GLint64;
-typedef uint64_t           GLuint64;
-typedef __GLsync* GLsync;
+using GLhalf   = unsigned short;
+using GLint64  = int64_t;
+using GLuint64 = uint64_t;
+using GLsync   = __GLsync*;
 
 namespace Integration
 {
@@ -116,6 +116,21 @@ public:
   virtual void PostRender() = 0;
 
   /**
+   * Returns current gles can support surfaceless context
+   * @Return true current gles support surfaceless context
+   */
+  virtual bool IsSurfacelessContextSupported() const = 0;
+
+  /**
+   * Determine whether to convert pixel format or not.
+   * @param[in] imageGlFormat GLformat of input image.
+   * @param[in] textureGlFormat GLformat of Texture.
+   * @param[in] isSubImage Boolian value for the whether the image is subimage or not
+   * @return Whether the texture will be convert or not.
+   */
+  virtual bool TextureRequiresConverting( const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage ) const = 0;
+
+  /**
    * The number of texture units an implementation supports is implementation dependent, but must be at least 8.
    */
   static const unsigned int MIN_TEXTURE_UNIT_LIMIT = 8;
@@ -378,4 +393,4 @@ public:
 
 } // namespace Dali
 
-#endif // __DALI_INTEGRATION_GL_ABSTRACTION_H__
+#endif // DALI_INTEGRATION_GL_ABSTRACTION_H