Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions webrender/res/ps_border_corner.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int select_style(int color_select, vec2 fstyle) {

switch (color_select) {
case SIDE_BOTH:
{
// TODO(gw): A temporary hack! While we don't support
// border corners that have dots or dashes
// with another style, pretend they are solid
Expand All @@ -102,6 +103,7 @@ int select_style(int color_select, vec2 fstyle) {
if (style.x != style.y && (has_dots || has_dashes))
return BORDER_STYLE_SOLID;
return style.x;
}
case SIDE_FIRST:
return style.x;
case SIDE_SECOND:
Expand Down
4 changes: 4 additions & 0 deletions webrender/res/ps_border_edge.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ void write_color(vec4 color, float style, bool flip) {

switch (int(style)) {
case BORDER_STYLE_GROOVE:
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see declarations in these switch cases. Are they also a problem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget to explain this case. See 1, ANGLE will translate ternary operator to type s; if(b) s = x; else s = y;. And type s is a declaration.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, that's somewhat obscure
thanks for clarification!

modulate = flip ? vec2(1.3, 0.7) : vec2(0.7, 1.3);
break;
}
case BORDER_STYLE_RIDGE:
{
modulate = flip ? vec2(0.7, 1.3) : vec2(1.3, 0.7);
break;
}
default:
modulate = vec2(1.0);
break;
Expand Down