Skip to content

Commit

Permalink
cmd/gogio/testdata: always clear background to white
Browse files Browse the repository at this point in the history
The webassembly port changed to use transparent black to allow content
below Gio to show through. However, the end-to-end tests expect a white
background.

Signed-off-by: Elias Naur <[email protected]>
  • Loading branch information
eliasnaur committed Feb 18, 2021
1 parent 4f3f0fa commit ffb56f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module gioui.org/cmd
go 1.13

require (
gioui.org v0.0.0-20201206220230-a87a520ae825
gioui.org v0.0.0-20210218074926-aaff0fef5381
github.com/akavel/rsrc v0.10.1
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4
github.com/chromedp/chromedp v0.5.2
Expand Down
4 changes: 2 additions & 2 deletions cmd/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20201206220230-a87a520ae825 h1:8eQeFlQ0IL5sOX74YcwEBk3OtGNTRCqIU3Rz0z0U6vE=
gioui.org v0.0.0-20201206220230-a87a520ae825/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
gioui.org v0.0.0-20210218074926-aaff0fef5381 h1:g+ptkCry6O5+guP707JpLuCY48TtAtrTWOB5qlzw4VM=
gioui.org v0.0.0-20210218074926-aaff0fef5381/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/akavel/rsrc v0.10.1 h1:hCCPImjmFKVNGpeLZyTDRHEFC283DzyTXTo0cO0Rq9o=
github.com/akavel/rsrc v0.10.1/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
Expand Down
2 changes: 2 additions & 0 deletions cmd/gogio/testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func loop(w *app.Window) error {
return e.Err
case system.FrameEvent:
gtx := layout.NewContext(&ops, e)
// Clear background to white, even on embedded platforms such as webassembly.
paint.Fill(gtx.Ops, color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
layout.Flex{Axis: layout.Vertical}.Layout(gtx,
layout.Flexed(1, func(gtx C) D {
return layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
Expand Down

0 comments on commit ffb56f4

Please sign in to comment.