Revert "dri2: Update Pixmap pitch when changing its backing bo"

This reverts commit f6d255cf9ecc7ef5e38ad0bbaed219da26de49da.

This commit was a workaround to fix to allow glmark2-es2 to use
an EGLConfig w/ and alpha channel when using a non-fullscreen
window.

The workaround was needed at the time because the armsoc driver
did not create its own depth-32 X visual for its XRGB8888 format,
and instead, it was the Composite extension (COMPOSITE) that was
creating an alternate depth-32 X visual.

The mali driver used this alternate X visual for its EGLConfig that
had an alpha channel.  Any Windows created with this X visual,
however, would get implicitly redirected by COMPOSITE.  This means
that the Pixmap for such a Window would no longer be the Pixmap for
the root Window, but instead would be a special temporary Pixmap
created by COMPOSITE.

Thus, when we performed a DRI2SwapBuffers for such a non-fullscreen
Window with the alternate depth-32 X Visual, the DRI2CopyRegion
would use the window-sized redirect Pixmap as the destination,
so its devKind would be the pitch for a window-sized bo.
However, we actually switch the destination Pixmap's buffer to
the root Window's bo, (aka the "one true scanout"), whose pitch
is actually the pitch for a whole-screen bo.  Thus the pitch
would be wrong when doing the copy leading to visible screen
corruption.

However, now that armsoc defines its own depth-32 X visual,
the Mali driver's w/alpha EGLConfigs no longer use the Composite
extension's alternate X visual, nor are windows created with
that X visual redirected by COMPOSITE, and thus they will actual
have the root Window Pixmap for their Front Buffers.  Thus,
when we switch the bo to the scanout, the pitch will match the
Window's Pixmaps' devKind.

BUG=chrome-os-partner:24958
TEST=1. Connect external monitor to daisy
     2. Change "Internal Display" resolution to 1536x864 from Setting menu
  => No horizontal lines across image; No stale (32x32) tiles when screen
     updates.

Change-Id: I886fa5ba0e09bcc056d6ece7322fdf574e45f7a9
Reviewed-on: https://chromium-review.googlesource.com/186620
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
1 file changed