summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Vertex.h
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2011-05-02 15:00:16 -0700
committerChet Haase <chet@google.com>2011-05-02 15:08:38 -0700
commit99585adeb4167ca357a72eb866f34c1af944f4b9 (patch)
treeba993a2167fb880c98e29e4d2bd46933e182b1cf /libs/hwui/Vertex.h
parent71a0dab1ca962c2827be0221a7fbcc065dc3cbb8 (diff)
downloadframeworks_base-99585adeb4167ca357a72eb866f34c1af944f4b9.zip
frameworks_base-99585adeb4167ca357a72eb866f34c1af944f4b9.tar.gz
frameworks_base-99585adeb4167ca357a72eb866f34c1af944f4b9.tar.bz2
Line endcaps for AA lines are now antialiased.
Also fixed other minor issues with AA and line rendering. Change-Id: Icd4638d27c70e2ee0f28b5d9a2b97d8b29e8ac4d
Diffstat (limited to 'libs/hwui/Vertex.h')
-rw-r--r--libs/hwui/Vertex.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/hwui/Vertex.h b/libs/hwui/Vertex.h
index c120428..38455dc 100644
--- a/libs/hwui/Vertex.h
+++ b/libs/hwui/Vertex.h
@@ -68,6 +68,25 @@ struct AlphaVertex : Vertex {
}
}; // struct AlphaVertex
+/**
+ * Simple structure to describe a vertex with a position and an alpha value.
+ */
+struct AAVertex : Vertex {
+ float width;
+ float length;
+
+ static inline void set(AAVertex* vertex, float x, float y, float width, float length) {
+ Vertex::set(vertex, x, y);
+ vertex[0].width = width;
+ vertex[0].length = length;
+ }
+
+ static inline void setColor(AAVertex* vertex, float width, float length) {
+ vertex[0].width = width;
+ vertex[0].length = length;
+ }
+}; // struct AlphaVertex
+
}; // namespace uirenderer
}; // namespace android