Bring back compatibility with go1.4.2

- apa102 benchmark used image.CMYK, which was added in go 1.5. This has the side
  effect of making benchmark BenchmarkDrawSlowpath a bit faster.
- mpu9250 used type aliasing by accident, which was added in go1.9.
- periph-web used http.Server.Shutdown(), which was added in go1.8.
pull/1/head
Marc-Antoine Ruel 8 years ago
parent 6e81933d56
commit f325631d2a

@ -1049,12 +1049,11 @@ func BenchmarkDrawRGBAColorfulPassThru(b *testing.B) {
func BenchmarkDrawSlowpath(b *testing.B) {
// Should be an image type that doesn't have a fast path
img := image.NewCMYK(image.Rect(0, 0, 150, 1))
img := image.NewGray(image.Rect(0, 0, 150, 1))
for x := 0; x < img.Bounds().Dx(); x++ {
for y := 0; y < img.Bounds().Dy(); y++ {
pix := genColorfulPixel(x)
c := color.CMYK{C: pix[0], M: pix[1], Y: pix[2], K: 0xFF}
img.Set(x, y, c)
img.Set(x, y, color.Gray{pix[0]})
}
}
o := DefaultOpts

@ -10,7 +10,7 @@ import (
)
// DebugF the debug function type.
type DebugF = func(string, ...interface{})
type DebugF func(string, ...interface{})
// SpiTransport Encapsulates the SPI transport parameters.
type SpiTransport struct {

Loading…
Cancel
Save