Sign in
skia
/
skia
/
7e33d95f4f881f7d304ea81db39d20be4dab4416
/
.
/
resources
/
sksl
/
inliner
/
SwitchWithCastCanBeInlined.sksl
blob: 6658400379dbe765eb70ac47151fb2e7af9891c0 [
file
] [
log
] [
blame
]
uniform half4 color
;
inline
half4 switchy
(
half4 c
)
{
half4 result
;
switch
(
int
(
c
.
x
))
{
case
1
:
result
=
c
.
yyyy
;
break
;
default
:
result
=
c
.
zzzz
;
break
;
}
return
result
;
}
void
main
()
{
sk_FragColor
=
switchy
(
color
);
}