Test transform fix. try: -b do -p linux64 -u all[linux64-qr] -t all[linux64-qr]
authorGlenn Watson <github@intuitionlibrary.com>
Wed, 03 Jan 2018 13:19:06 +1000
changeset 1385979 4e8f223387e4c6336117c7d1fb5f624136adf6d2
parent 1385730 4d1423f75c677447cafb8cd3f9a5fbdff8bfbca8
child 1598795 dc67141529d1cc4ad31a8ecae13370a183eeb201
push id243747
push usergwatson@mozilla.com
push dateWed, 03 Jan 2018 03:19:49 +0000
treeherdertry@4e8f223387e4 [default view] [failures only]
milestone59.0a1
Test transform fix. try: -b do -p linux64 -u all[linux64-qr] -t all[linux64-qr]
gfx/webrender/res/prim_shared.glsl
--- a/gfx/webrender/res/prim_shared.glsl
+++ b/gfx/webrender/res/prim_shared.glsl
@@ -671,17 +671,17 @@ VertexInfo write_transform_vertex(RectWi
     // Convert the world positions to device pixel space.
     vec2 device_pos = world_pos.xy / world_pos.w * uDevicePixelRatio;
     vec2 task_offset = task.common_data.task_rect.p0 - task.content_origin;
 
     // We want the world space coords to be perspective divided by W.
     // We also want that to apply to any interpolators. However, we
     // want a constant Z across the primitive, since we're using it
     // for draw ordering - so scale by the W coord to ensure this.
-    vec4 final_pos = vec4(world_pos.xy * uDevicePixelRatio + task_offset,
+    vec4 final_pos = vec4((device_pos + task_offset) * world_pos.w,
                           z * world_pos.w,
                           world_pos.w);
     gl_Position = uTransform * final_pos;
 
     vLocalBounds = mix(
         vec4(prim_rect.p0, prim_rect.p1),
         vec4(segment_rect.p0, segment_rect.p1),
         clip_edge_mask