From 4d5f7dcba87049c0c2b1d8c44c66762cf011b7d7 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Fri, 1 Apr 2022 12:09:17 +0000 Subject: [PATCH] Bug 1759526 - Remove dead intersect_lines. r=gw Depends on D141479 Differential Revision: https://phabricator.services.mozilla.com/D141477 --- gfx/wr/webrender/res/prim_shared.glsl | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/gfx/wr/webrender/res/prim_shared.glsl b/gfx/wr/webrender/res/prim_shared.glsl index 7fc2f4675b89..2f1d5b90b1f1 100644 --- a/gfx/wr/webrender/res/prim_shared.glsl +++ b/gfx/wr/webrender/res/prim_shared.glsl @@ -132,25 +132,6 @@ VertexInfo write_vertex(vec2 local_pos, return vi; } -float cross2(vec2 v0, vec2 v1) { - return v0.x * v1.y - v0.y * v1.x; -} - -// Return intersection of line (p0,p1) and line (p2,p3) -vec2 intersect_lines(vec2 p0, vec2 p1, vec2 p2, vec2 p3) { - vec2 d0 = p0 - p1; - vec2 d1 = p2 - p3; - - float s0 = cross2(p0, p1); - float s1 = cross2(p2, p3); - - float d = cross2(d0, d1); - float nx = s0 * d1.x - d0.x * s1; - float ny = s0 * d1.y - d0.y * s1; - - return vec2(nx / d, ny / d); -} - RectWithEndpoint clip_and_init_antialiasing(RectWithEndpoint local_segment_rect, RectWithEndpoint local_prim_rect, RectWithEndpoint local_clip_rect,