summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Rect.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-06-24 19:30:36 -0700
committerRomain Guy <romainguy@google.com>2010-06-24 19:30:36 -0700
commit9d5316e3f56d138504565ff311145ac01621dff4 (patch)
tree40c79ba098de4624fbe38cb400c6ac4fe7340673 /libs/hwui/Rect.h
parenta18dbdf420fabebb83e7403d000384a8d98daffa (diff)
downloadframeworks_base-9d5316e3f56d138504565ff311145ac01621dff4.zip
frameworks_base-9d5316e3f56d138504565ff311145ac01621dff4.tar.gz
frameworks_base-9d5316e3f56d138504565ff311145ac01621dff4.tar.bz2
Add colored rectangles implementation in OpenGLRenderer.
Drawing two rectangles one after the other discards the second one because of Z buffering issues. This will be fixed in another changelist. Change-Id: Ida1b3cde8a78e60cacc07e477abc44def527ff67
Diffstat (limited to 'libs/hwui/Rect.h')
-rw-r--r--libs/hwui/Rect.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index 724bd1a..fcf11e9 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -14,10 +14,11 @@
* limitations under the License.
*/
-#ifndef ANDROID_RECT_H
-#define ANDROID_RECT_H
+#ifndef ANDROID_UI_RECT_H
+#define ANDROID_UI_RECT_H
namespace android {
+namespace uirenderer {
///////////////////////////////////////////////////////////////////////////////
// Structs
@@ -29,7 +30,19 @@ struct Rect {
float right;
float bottom;
- Rect(): left(0), top(0), right(0), bottom(0) { }
+ Rect():
+ left(0),
+ top(0),
+ right(0),
+ bottom(0) {
+ }
+
+ Rect(float left, float top, float right, float bottom):
+ left(left),
+ top(top),
+ right(right),
+ bottom(bottom) {
+ }
Rect(const Rect& r) {
set(r);
@@ -120,6 +133,7 @@ struct Rect {
}; // struct Rect
+}; // namespace uirenderer
}; // namespace android
#endif // ANDROID_RECT_H