Simplify the viewport code a bit.
Normalize newlines, no code changes.

We really shouldn't let mixed newlines creep into the codebase.
They're annoying.
Oops, left the comment in the wrong one.
Merge pull request #6946 from unknownbrackets/gpu-minor

Simplify the viewport calculation