optimize ToRGBA (weird one)

This commit is contained in:
faiface 2017-07-03 00:23:07 +02:00
parent dd1ddd15b3
commit be247e49f5
1 changed files with 0 additions and 8 deletions

View File

@ -80,14 +80,6 @@ func ToRGBA(c color.Color) RGBA {
if c, ok := c.(RGBA); ok {
return c
}
if c, ok := c.(color.RGBA); ok {
return RGBA{
R: float64(c.R) / 255,
G: float64(c.G) / 255,
B: float64(c.B) / 255,
A: float64(c.A) / 255,
}
}
r, g, b, a := c.RGBA()
return RGBA{
float64(r) / 0xffff,