shiny/driver: handle dstPoint or srcRect out of bounds.

This is for gldriver and x11driver. I don't know if the windriver does
the right thing if you pass e.g. dp = image.Pt(-64, 0) or sr =
image.Rect(-64, 0, 256, 128) to the Upload or Draw calls in
example/basic.

Also fix gldriver's Texture.Upload when the srcRect width is less than
the texture width.

Also fix gldriver's Window.Upload then the dstPoint is non-zero.

Also zero-initialize the x11driver's texture's pixels, as the X11 server
doesn't do this automatically.

Change-Id: Ifb6f93e2bea635977bc1ee911457af74acde658f
Reviewed-on: https://go-review.googlesource.com/23469
Reviewed-by: David Crawshaw <crawshaw@golang.org>
6 files changed