Move FloatRect from libgfx to libui
Moves FloatRect from libgfx (which is being disintegrated) to libui
Test: Builds and sailfish boots
Change-Id: I68c1b7d86a363066fe4d6f0c038ca9d92d7ab9c7
diff --git a/include/gfx/FloatRect.h b/include/ui/FloatRect.h
similarity index 96%
rename from include/gfx/FloatRect.h
rename to include/ui/FloatRect.h
index 6be5e22..270675c 100644
--- a/include/gfx/FloatRect.h
+++ b/include/ui/FloatRect.h
@@ -17,10 +17,9 @@
#pragma once
namespace android {
-namespace gfx {
class FloatRect {
- public:
+public:
FloatRect() = default;
constexpr FloatRect(float _left, float _top, float _right, float _bottom)
: left(_left), top(_top), right(_right), bottom(_bottom) {}
@@ -38,5 +37,4 @@
return a.left == b.left && a.top == b.top && a.right == b.right && a.bottom == b.bottom;
}
-} // namespace gfx
} // namespace android
diff --git a/include/ui/Rect.h b/include/ui/Rect.h
index ce33d4e..3d600be 100644
--- a/include/ui/Rect.h
+++ b/include/ui/Rect.h
@@ -17,12 +17,12 @@
#ifndef ANDROID_UI_RECT
#define ANDROID_UI_RECT
-#include <gfx/FloatRect.h>
#include <utils/Flattenable.h>
#include <utils/Log.h>
#include <utils/TypeHelpers.h>
#include <log/log.h>
+#include <ui/FloatRect.h>
#include <ui/Point.h>
#include <android/rect.h>
@@ -185,7 +185,7 @@
inline int32_t height() const { return getHeight(); }
inline void set(const Rect& rhs) { operator = (rhs); }
- gfx::FloatRect toFloatRect() const {
+ FloatRect toFloatRect() const {
return {static_cast<float>(left), static_cast<float>(top),
static_cast<float>(right), static_cast<float>(bottom)};
}