[WIN32] avoid getting the viewport so often.
[WIN32] fixed: use backbuffer only if we got it.
Merge pull request #3747 from wsoltys/viewport

[WIN32] avoid getting the viewport so often