Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / common / blending-options.h
index c5284bb..f150685 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_BLENDING_OPTIONS_H
 
 /*
- * Copyright (c) 2016 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.
@@ -20,7 +20,9 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/rendering/renderer.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 #include <dali/public-api/math/vector4.h>
+#include <dali/internal/common/owner-pointer.h>
 
 namespace Dali
 {
@@ -82,17 +84,17 @@ struct BlendingOptions
   /**
    * @copydoc Dali::RenderableActor::SetBlendEquation()
    */
-  void SetBlendEquation( BlendEquation::Type equationRgb, BlendEquation::Type equationAlpha );
+  void SetBlendEquation( DevelBlendEquation::Type equationRgb, DevelBlendEquation::Type equationAlpha );
 
   /**
    * @copydoc Dali::RenderableActor::GetBlendEquation()
    */
-  BlendEquation::Type GetBlendEquationRgb() const;
+  DevelBlendEquation::Type GetBlendEquationRgb() const;
 
   /**
    * @copydoc Dali::RenderableActor::GetBlendEquation()
    */
-  BlendEquation::Type GetBlendEquationAlpha() const;
+  DevelBlendEquation::Type GetBlendEquationAlpha() const;
 
   /**
    * Set the blend color.
@@ -107,6 +109,18 @@ struct BlendingOptions
    */
   const Vector4* GetBlendColor() const;
 
+  /**
+   * Query whether current blend equation is advanced option.
+   * @return True if current blend equation is advanced.
+   */
+  bool IsAdvancedBlendEquationApplied();
+
+  /**
+   * Query whether input blend equation is advanced option.
+   * @return True if input blend equation is advanced.
+   */
+  static bool IsAdvancedBlendEquation( DevelBlendEquation::Type equation );
+
 private:
 
   // Undefined copy constructor.
@@ -119,7 +133,7 @@ private:
 
   unsigned int mBitmask; ///< A bitmask of blending options
 
-  Vector4* mBlendColor; ///< A heap-allocated color (owned)
+  OwnerPointer< Vector4> mBlendColor; ///< A heap-allocated color (owned)
 
 };