[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-sampler.h
index 4bc1953..c5040ae 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_RENDER_SAMPLER_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -18,8 +18,7 @@
  */
 
 #include <dali/public-api/actors/sampling.h>
-#include <dali/devel-api/rendering/sampler.h>
-#include <dali/internal/render/renderers/render-sampler.h>
+#include <dali/public-api/rendering/sampler.h>
 
 namespace Dali
 {
@@ -51,21 +50,25 @@ struct Sampler
   ~Sampler()
   {}
 
-
-  union
+  bool operator==(const Sampler& rhs) const
   {
-    unsigned int mBitfield;
-
-    struct
-    {
-      FilterMode  mMinificationFilter   : 4;    ///< The minify filter
-      FilterMode  mMagnificationFilter  : 4;    ///< The magnify filter
-      WrapMode    mSWrapMode            : 4;    ///< The horizontal wrap mode
-      WrapMode    mTWrapMode            : 4;    ///< The vertical wrap mode
-      WrapMode    mRWrapMode            : 4;    ///< The vertical wrap mode
-    };
-
-  };
+    return ( ( mMinificationFilter == rhs.mMinificationFilter ) &&
+             ( mMagnificationFilter == rhs.mMagnificationFilter ) &&
+             ( mSWrapMode == rhs.mSWrapMode ) &&
+             ( mTWrapMode == rhs.mTWrapMode ) &&
+             ( mRWrapMode == rhs.mRWrapMode ) );
+  }
+
+  bool operator!=(const Sampler& rhs) const
+  {
+    return !(*this == rhs);
+  }
+
+  FilterMode  mMinificationFilter   : 4;    ///< The minify filter
+  FilterMode  mMagnificationFilter  : 4;    ///< The magnify filter
+  WrapMode    mSWrapMode            : 4;    ///< The horizontal wrap mode
+  WrapMode    mTWrapMode            : 4;    ///< The vertical wrap mode
+  WrapMode    mRWrapMode            : 4;    ///< The vertical wrap mode
 };
 
 } // namespace Render