diff options
Diffstat (limited to 'libgo/go/image/draw/bench_test.go')
-rw-r--r-- | libgo/go/image/draw/bench_test.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libgo/go/image/draw/bench_test.go b/libgo/go/image/draw/bench_test.go index 2be91185af2..4cd2095c441 100644 --- a/libgo/go/image/draw/bench_test.go +++ b/libgo/go/image/draw/bench_test.go @@ -7,7 +7,6 @@ package draw import ( "image" "image/color" - "image/ycbcr" "testing" ) @@ -51,7 +50,7 @@ func bench(b *testing.B, dcm, scm, mcm color.Model, op Op) { } dst = dst1 default: - panic("unreachable") + b.Fatal("unknown destination color model", dcm) } var src image.Image @@ -97,7 +96,7 @@ func bench(b *testing.B, dcm, scm, mcm color.Model, op Op) { } } src = src1 - case ycbcr.YCbCrColorModel: + case color.YCbCrModel: yy := make([]uint8, srcw*srch) cb := make([]uint8, srcw*srch) cr := make([]uint8, srcw*srch) @@ -106,17 +105,17 @@ func bench(b *testing.B, dcm, scm, mcm color.Model, op Op) { cb[i] = uint8(5 * i % 0x100) cr[i] = uint8(7 * i % 0x100) } - src = &ycbcr.YCbCr{ + src = &image.YCbCr{ Y: yy, Cb: cb, Cr: cr, YStride: srcw, CStride: srcw, - SubsampleRatio: ycbcr.SubsampleRatio444, + SubsampleRatio: image.YCbCrSubsampleRatio444, Rect: image.Rect(0, 0, srcw, srch), } default: - panic("unreachable") + b.Fatal("unknown source color model", scm) } var mask image.Image @@ -137,7 +136,7 @@ func bench(b *testing.B, dcm, scm, mcm color.Model, op Op) { } mask = mask1 default: - panic("unreachable") + b.Fatal("unknown mask color model", mcm) } b.StartTimer() @@ -177,7 +176,7 @@ func BenchmarkNRGBASrc(b *testing.B) { } func BenchmarkYCbCr(b *testing.B) { - bench(b, color.RGBAModel, ycbcr.YCbCrColorModel, nil, Over) + bench(b, color.RGBAModel, color.YCbCrModel, nil, Over) } func BenchmarkGlyphOver(b *testing.B) { |