summaryrefslogtreecommitdiff
path: root/libs/hwui/Vertex.h
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2013-09-17 19:17:12 -0700
committer Chris Craik <ccraik@google.com> 2013-09-17 19:17:12 -0700
commit2765c0b71679b5762ed72610e8310abd6d071b96 (patch)
treee30f430930366ef5be5688c1b6a0a1adbf2984d2 /libs/hwui/Vertex.h
parente08e6632294143f889ab68f0c3453ee6802dc60e (diff)
parentd97303a73babf8f820a78f72d558be8e4ad09f47 (diff)
resolved conflicts for merge of d97303a7 to master
Change-Id: I29e2e64e0ec241675762482cbe5c5e9dc58adca6
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 9ec84ccd9216..351ce71bbc00 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) {