Fix resize and vsync issues in Mac Viewer

* Move OpenGL vsync setup out of initial context setup block
* Fix window repaints for OpenGL and Metal
* Also moved some Mac-specific code into Mac-specific Metal class

Bug: skia:9095
Change-Id: I221edfbd2292d949cc15232ed2791f8fe1bbe2ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214686
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
4 files changed