From 62a42c13a6e86255a0118688a60c9248030c95a9 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 15 Feb 2013 11:58:14 -0800 Subject: Adjust offset for non-AA line drawing bug:8114304 The original .375 was chosen to make GL_LINES align with Skia drawing. The new value of .065 is chosen to be as small as possible to make triangle-based lines align with Skia, while keeping lines drawn on integer coordinates unambiguous as to which column/row they draw on. Also adds more lines in CanvasCompare test to highlight the difference Change-Id: If578684f2db320682219c3caa625cf79bc62d88f --- libs/hwui/Program.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/Program.cpp') diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index f0b5553a79a7..14a23765b301 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -160,7 +160,7 @@ void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix, // up and to the left. // This offset value is based on an assumption that some hardware may use as // little as 12.4 precision, so we offset by slightly more than 1/16. - p.translate(.375, .375, 0); + p.translate(.065, .065, 0); } mat4 t(transformMatrix); -- cgit v1.2.3-59-g8ed1b