summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/line_program.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-09-07 15:21:05 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-09-12 08:21:51 -0700
commit73e9ba14390fc5da5c1fb2fc0392accb606e04ff (patch)
tree5c01969cef25ab4289d62df67ce3d664297334c2 /src/mbgl/programs/line_program.hpp
parentefe9928ad507cc99fceb78b83c7bcc8eae69b0f9 (diff)
downloadqtlocation-mapboxgl-73e9ba14390fc5da5c1fb2fc0392accb606e04ff.tar.gz
[core] Align line vertex to 4-byte boundary
10 byte vertices are heavily penalized by common GL implementations. Cherry-picks aa4dff1095e8f5e8ad584f5f7dcab3e61d8cf8ee
Diffstat (limited to 'src/mbgl/programs/line_program.hpp')
-rw-r--r--src/mbgl/programs/line_program.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/programs/line_program.hpp b/src/mbgl/programs/line_program.hpp
index 0a56ae5dad..9cfc2d3257 100644
--- a/src/mbgl/programs/line_program.hpp
+++ b/src/mbgl/programs/line_program.hpp
@@ -61,7 +61,8 @@ public:
{{
p.x,
p.y,
- static_cast<int16_t>(attributes::packUint8Pair(round ? 1 : 0, up ? 1 : 0))
+ static_cast<int16_t>(round ? 1 : 0),
+ static_cast<int16_t>(up ? 1 : -1)
}},
{{
// add 128 to store a byte in an unsigned byte