draw: delete some dead code.
Change-Id: I5830755b0be52df2be536a918f47684a1b7eda9d Reviewed-on: https://go-review.googlesource.com/9232 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
3940ddb240
commit
b621bdc118
40
draw/gen.go
40
draw/gen.go
|
@ -366,8 +366,6 @@ func expnDollar(prefix, dollar, suffix string, d *data) string {
|
|||
default:
|
||||
log.Fatalf("bad dType %q", d.dType)
|
||||
case "Image":
|
||||
switch d.sType {
|
||||
default:
|
||||
return argf(args, ""+
|
||||
"if dstMask != nil {\n"+
|
||||
" qr, qg, qb, qa := dst.At($0, $1).RGBA()\n"+
|
||||
|
@ -390,24 +388,6 @@ func expnDollar(prefix, dollar, suffix string, d *data) string {
|
|||
" dst.Set($0, $1, dstColor)\n"+
|
||||
"}",
|
||||
)
|
||||
case "*image.Gray":
|
||||
return argf(args, ""+
|
||||
"out := uint16($2r)\n"+
|
||||
"dstColorRGBA64.R = out\n"+
|
||||
"dstColorRGBA64.G = out\n"+
|
||||
"dstColorRGBA64.B = out\n"+
|
||||
"dstColorRGBA64.A = 0xffff\n"+
|
||||
"dst.Set($0, $1, dstColor)",
|
||||
)
|
||||
case "*image.YCbCr":
|
||||
return argf(args, ""+
|
||||
"dstColorRGBA64.R = uint16($2r)\n"+
|
||||
"dstColorRGBA64.G = uint16($2g)\n"+
|
||||
"dstColorRGBA64.B = uint16($2b)\n"+
|
||||
"dstColorRGBA64.A = 0xffff\n"+
|
||||
"dst.Set($0, $1, dstColor)",
|
||||
)
|
||||
}
|
||||
case "*image.RGBA":
|
||||
switch d.sType {
|
||||
default:
|
||||
|
@ -488,8 +468,6 @@ func expnDollar(prefix, dollar, suffix string, d *data) string {
|
|||
default:
|
||||
log.Fatalf("bad dType %q", d.dType)
|
||||
case "Image":
|
||||
switch d.sType {
|
||||
default:
|
||||
ret = argf(args, ""+
|
||||
"if dstMask != nil {\n"+
|
||||
" qr, qg, qb, qa := dst.At($0, $1).RGBA()\n"+
|
||||
|
@ -512,24 +490,6 @@ func expnDollar(prefix, dollar, suffix string, d *data) string {
|
|||
" dst.Set($0, $1, dstColor)\n"+
|
||||
"}",
|
||||
)
|
||||
case "*image.Gray":
|
||||
ret = argf(args, ""+
|
||||
"out := $2($3r * $4)\n"+
|
||||
"dstColorRGBA64.R = out\n"+
|
||||
"dstColorRGBA64.G = out\n"+
|
||||
"dstColorRGBA64.B = out\n"+
|
||||
"dstColorRGBA64.A = 0xffff\n"+
|
||||
"dst.Set($0, $1, dstColor)",
|
||||
)
|
||||
case "*image.YCbCr":
|
||||
ret = argf(args, ""+
|
||||
"dstColorRGBA64.R = $2($3r * $4)\n"+
|
||||
"dstColorRGBA64.G = $2($3g * $4)\n"+
|
||||
"dstColorRGBA64.B = $2($3b * $4)\n"+
|
||||
"dstColorRGBA64.A = 0xffff\n"+
|
||||
"dst.Set($0, $1, dstColor)",
|
||||
)
|
||||
}
|
||||
case "*image.RGBA":
|
||||
switch d.sType {
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user