dri2: Update Pixmap pitch when changing its backing bo

A Pixmap's pitch is stored in its devKind field. When performing
DRI2SwapBuffers on a non-flippable DRI2Drawable (for example, for a Window
whose dimensions do not match the CTRC scanout), we call
OMAPDRI2CopyRegion to perform a blit instead of a page flip.

Before doing the blit, we first change the Pixmap's backing bo from
whatever it was to the ("one true") scanout bo, and switch to blit mode.

Whenever updating a Pixmap's backing bo, we must also update its pitch
to match, since it is the Pixmap's pitch that is used when performing the
blit in CopyRegion().

BUG=chromium:221640
TEST=./run_remote_tests.sh graphics_GLMark2
TEST=sanity check UI w/ and w/out external monitor

Change-Id: Iaef5f835853fb01cd7a9e39d0bac5e0a802249fb
Reviewed-on: https://chromium-review.googlesource.com/180364
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
1 file changed