Surface Control: Set display and crop rects correctly for overlays.

The framework does not handle display bounds at a negative offset and
simply snaps them to [0,0]. This was resulting in the complete buffer
getting scaled down to the visible rect size for the overlay. Avoid that
by computing the correct source crop based on the visible subset of the
overlay and adjusting the overlay's uv_rect and display_rect accordingly.

R=enne@chromium.org

Bug: 941278
Change-Id: If911fc4a6fd087aca2fa285e1499380e7c27331e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1517159
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Auto-Submit: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640489}
6 files changed