Simplify the atlas update inner loop

Try to move calculations out of the main atlas update loop.

Simplify expressions involving the result values. Invert the if-statement
and for-loop to do even less work.

Change-Id: Ibef88e65fb5bb8eeeaec13f0ae0ba1acb4d2d87d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262926
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
1 file changed