summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Vertex.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Vertex.h')
-rw-r--r--libs/hwui/Vertex.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/hwui/Vertex.h b/libs/hwui/Vertex.h
index 9ec84cc..351ce71 100644
--- a/libs/hwui/Vertex.h
+++ b/libs/hwui/Vertex.h
@@ -26,6 +26,15 @@ namespace uirenderer {
* Simple structure to describe a vertex with a position and a texture.
*/
struct Vertex {
+ /**
+ * Fudge-factor used to disambiguate geometry pixel positioning.
+ *
+ * Used to offset lines and points to avoid ambiguous intersection with pixel centers (see
+ * Program::set()), and used to make geometry damage rect calculation conservative (see
+ * Rect::snapGeometryToPixelBoundaries())
+ */
+ static const float gGeometryFudgeFactor = 0.0656f;
+
float x, y;
static inline void set(Vertex* vertex, float x, float y) {