Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / android / native-image-source-impl-android.h
old mode 100755 (executable)
new mode 100644 (file)
index bd3e101..04e44bc
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
 
 namespace Dali
 {
-
 namespace Internal
 {
-
 namespace Adaptor
 {
 class EglImageExtensions;
@@ -44,7 +42,6 @@ class EglImageExtensions;
 class NativeImageSourceAndroid : public Internal::Adaptor::NativeImageSource
 {
 public:
-
   /**
    * Create a new NativeImageSource internally.
    * Depending on hardware the width and height may have to be a power of two.
@@ -54,10 +51,10 @@ public:
    * @param[in] nativeImageSource contains either: Android hardware buffer or is empty
    * @return A smart-pointer to a newly allocated image.
    */
-  static NativeImageSourceAndroid* New( uint32_t width,
-                          uint32_t height,
-                          Dali::NativeImageSource::ColorDepth depth,
-                          Any nativeImageSource);
+  static NativeImageSourceAndroid* New(uint32_t                            width,
+                                       uint32_t                            height,
+                                       Dali::NativeImageSource::ColorDepth depth,
+                                       Any                                 nativeImageSource);
   /**
    * @copydoc Dali::NativeImageSource::GetNativeImageSource()
    */
@@ -66,17 +63,17 @@ public:
   /**
    * @copydoc Dali::NativeImageSource::GetPixels()
    */
-  bool GetPixels(std::vector<unsigned char> &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override;
+  bool GetPixels(std::vector<unsigned char>& pixbuf, uint32_t& width, uint32_t& height, Pixel::Format& pixelFormat) const override;
 
   /**
    * @copydoc Dali::NativeImageSource::SetSource( Any source )
    */
-  void SetSource( Any source ) override;
+  void SetSource(Any source) override;
 
   /**
    * @copydoc Dali::NativeImageSource::IsColorDepthSupported( ColorDepth colorDepth )
    */
-  bool IsColorDepthSupported( Dali::NativeImageSource::ColorDepth colorDepth ) override;
+  bool IsColorDepthSupported(Dali::NativeImageSource::ColorDepth colorDepth) override;
 
   /**
    * destructor
@@ -169,7 +166,7 @@ public:
   /**
    * @copydoc Dali::Internal::Adaptor::NativeImageSource::AcquireBuffer()
    */
-  uint8_t* AcquireBuffer( uint16_t& width, uint16_t& height, uint16_t& stride ) override;
+  uint8_t* AcquireBuffer(uint16_t& width, uint16_t& height, uint16_t& stride) override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::NativeImageSource::ReleaseBuffer()
@@ -177,7 +174,6 @@ public:
   bool ReleaseBuffer() override;
 
 private:
-
   /**
    * Private constructor; @see NativeImageSource::New()
    * @param[in] width The width of the image.
@@ -185,10 +181,10 @@ private:
    * @param[in] colour depth of the image.
    * @param[in] nativeImageSource contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
    */
-  NativeImageSourceAndroid( uint32_t width,
-              uint32_t height,
-              Dali::NativeImageSource::ColorDepth depth,
-              Any nativeImageSource);
+  NativeImageSourceAndroid(uint32_t                            width,
+                           uint32_t                            height,
+                           Dali::NativeImageSource::ColorDepth depth,
+                           Any                                 nativeImageSource);
 
   /**
    * 2nd phase construction.
@@ -209,15 +205,14 @@ private:
   void GetPixmapDetails();
 
 private:
-
-  uint32_t mWidth;                            ///< image width
-  uint32_t mHeight;                           ///< image heights
-  bool mOwnPixmap;                            ///< Whether we created pixmap or not
-  AHardwareBuffer* mPixmap;                   ///<
-  bool mBlendingRequired;                     ///< Whether blending is required
-  Dali::NativeImageSource::ColorDepth mColorDepth;  ///< color depth of image
-  void* mEglImageKHR;                         ///< From EGL extension
-  EglImageExtensions* mEglImageExtensions;    ///< The EGL Image Extensions
+  uint32_t                            mWidth;              ///< image width
+  uint32_t                            mHeight;             ///< image heights
+  bool                                mOwnPixmap;          ///< Whether we created pixmap or not
+  AHardwareBuffer*                    mPixmap;             ///<
+  bool                                mBlendingRequired;   ///< Whether blending is required
+  Dali::NativeImageSource::ColorDepth mColorDepth;         ///< color depth of image
+  void*                               mEglImageKHR;        ///< From EGL extension
+  EglImageExtensions*                 mEglImageExtensions; ///< The EGL Image Extensions
 };
 
 } // namespace Adaptor