Skip to content

Commit

Permalink
Manually re-apply ANGLE workaround in 3debb57.
Browse files Browse the repository at this point in the history
  • Loading branch information
gw3583 committed Jun 5, 2017
1 parent de7e944 commit 9143f1d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions webrender/res/prim_shared.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,11 @@ vec4 clamp_rect(vec4 points, RectWithSize rect) {
return clamp(points, rect.p0.xyxy, rect.p0.xyxy + rect.size.xyxy);
}

vec4 clamp_rect(vec4 points, RectWithEndpoint rect) {
return clamp(points, rect.p0.xyxy, rect.p1.xyxy);
}

RectWithSize intersect_rect(RectWithSize a, RectWithSize b) {
vec4 p = clamp_rect(vec4(a.p0, a.p0 + a.size), b);
return RectWithSize(p.xy, max(vec2(0.0), p.zw - p.xy));
}

RectWithEndpoint intersect_rect(RectWithEndpoint a, RectWithEndpoint b) {
vec4 p = clamp_rect(vec4(a.p0, a.p1), b);
return RectWithEndpoint(p.xy, max(p.xy, p.zw));
}

float distance_to_line(vec2 p0, vec2 perp_dir, vec2 p) {
vec2 dir_to_p0 = p0 - p;
return dot(normalize(perp_dir), dir_to_p0);
Expand Down

0 comments on commit 9143f1d

Please sign in to comment.