Fix merge errors from the refactor-gfx merge.
Merge pull request #379 from metajack/fix-merge-errors

Fix merge errors from the refactor-gfx merge.