Harden NativeThemeWin::PaintIndirect()

Speculative fix for crash observed in m54 beta.

Before https://codereview.chromium.org/2182083002, any sort of setup
error in PaintIndirect() would create an empty, unbacked SkCanvas;
we'd run the entire painting and pixel-copying code using it, turning
all the leaf operations into no-ops.

The previous change to PaintIndirect() used new APIs which are
pointer-based and would create NULL pointers in case of error;
although we didn't expect setup errors, we're seeing crashes that
suggest they are occurring in the field (possibly due to GDI handle
exhaustion or running out of memory).

This CL adds early exits if any of the preliminary setup steps has an
error. Calling SkSurface::getCanvas() is defined as *always* returning
some sort of canvas, so we leave it as a DCHECK(); the crash was
happening because we were halting initilization before having a valid
SkSurface to make that call against.

R=fmalita@chromium.org,pkasting@chromium.org
BUG=648790

Review-Url: https://codereview.chromium.org/2355423002
Cr-Commit-Position: refs/heads/master@{#420324}
1 file changed