New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 751232 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

wl_buffer::set_buffer_transform needs to be implemented

Project Member Reported by lpique@chromium.org, Aug 1 2017

Issue description

The current implementation of wl_buffer::set_buffer_transform (surface_set_buffer_transform()) is NOTIMPLEMENTED();

As an optimization, Wayland clients can prerender their buffers at the current wl_output.transform so that the compositor can directly scanout buffers that have the correct output transform, rather than having to do something more complicated.
 
It looks like we might need to extend it, to pass through a camera preview buffer that should not be rotated (or rather, should automatically be rotated by the inverse of the current display rotation)
The ability to inverse the current display rotation makes sense as an API. Short term we could add a simple wl_buffer interface extension for this and more long term we might want to update the core protocol.
Labels: -Pri-3 M-61 Pri-1
Cc: denniskempin@chromium.org tbuck...@chromium.org
Labels: Merge-Request-61
Fix landed as: 

https://chromium.googlesource.com/chromium/src/+/fca309bf8269d73b2b53267f400a5ec6009f0701

this will need to be merged to 61 after we've verified that it works together with Lloyd's HWC side changes.

Project Member

Comment 5 by sheriffbot@chromium.org, Aug 25 2017

Labels: -Merge-Request-61 Merge-Review-61 Hotlist-Merge-Review
This bug requires manual review: We are only 10 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), ketakid@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by ketakid@google.com, Aug 25 2017

Labels: -Merge-Review-61 Merge-Approved-61
Approving merge to M61 Chrome OS.
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4657db0e9d9e8c94e470ac66e99722abe4092ac3

commit 4657db0e9d9e8c94e470ac66e99722abe4092ac3
Author: David Reveman <reveman@chromium.org>
Date: Fri Aug 25 15:02:55 2017

exo: Protect against divide-by-0.

Scaled buffer size can be empty if current resource is not set. Make
sure we don't divide by 0 in this case.

Bug:  751232 
Change-Id: Ie4dabcd15d734c620ba195c82212f7ed06e506da
Reviewed-on: https://chromium-review.googlesource.com/635806
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497407}
[modify] https://crrev.com/4657db0e9d9e8c94e470ac66e99722abe4092ac3/components/exo/surface.cc

Project Member

Comment 8 by sheriffbot@chromium.org, Aug 28 2017

Cc: ketakid@google.com
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22587fbc6e08e23750798811b47cc55daf73580a

commit 22587fbc6e08e23750798811b47cc55daf73580a
Author: David Reveman <reveman@chromium.org>
Date: Mon Aug 28 22:27:18 2017

exo: Handle buffer transforms and surface origin correctly.

Include origin offset in buffer-to-target transform before
any other transformations instead of using it as a quad rect
offset that will be affected by rotation and scale transforms.

Bug:  751232 
Test: manual
Change-Id: Ibdcee139400b1684236a717325706bfca8f84186
Reviewed-on: https://chromium-review.googlesource.com/638470
Commit-Queue: David Reveman <reveman@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497902}
[modify] https://crrev.com/22587fbc6e08e23750798811b47cc55daf73580a/components/exo/surface.cc
[modify] https://crrev.com/22587fbc6e08e23750798811b47cc55daf73580a/components/exo/surface_unittest.cc

Project Member

Comment 10 by sheriffbot@chromium.org, Sep 1 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Assigned)
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0a3045f2254a248df9ca4d0da2229ad62afdd1bb

commit 0a3045f2254a248df9ca4d0da2229ad62afdd1bb
Author: Lloyd Pique <lpique@chromium.org>
Date: Fri Sep 15 23:34:12 2017

exo: Fix issues with viewports and transforms

The crop rectangle is set via the Wayland interface in post-transform
buffer coordinates. To generate UV coordinates, the crop rectangle must
be transformed by the inverse transform.

The forward transformation from "buffer" pixel space to target space
also turned out to be incorrect when there was a crop, there was no
viewport, and the buffer transformation was 90 or 270. The construction
of that transformation matrix now makes sense, unlike before.

The fixed up code shares a common buffer transformation matrix (rotating
in normalized coordinates around 0.5, 0.5), but that is all that can be
shared. The two transformations otherwise apply different scaling and
translations to get to their respective coordinate spaces otherwise.

Correct functionality was verified with a test app that sets a crop
rectangle while also setting/disabling the viewport rectangle, while
cycling through buffers at different rotations. The test app was run on
Chrome OS as well as under the Weston reference implementation.

BUG= 751232 

Change-Id: Ibca12b6d722891076db4cb053d133d128ee78889
Reviewed-on: https://chromium-review.googlesource.com/653494
Commit-Queue: Lloyd Pique <lpique@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502440}
[modify] https://crrev.com/0a3045f2254a248df9ca4d0da2229ad62afdd1bb/components/exo/surface.cc
[modify] https://crrev.com/0a3045f2254a248df9ca4d0da2229ad62afdd1bb/components/exo/surface.h
[modify] https://crrev.com/0a3045f2254a248df9ca4d0da2229ad62afdd1bb/components/exo/surface_unittest.cc

Cc: reve...@chromium.org
Labels: Merge-Request-62 M-62
Owner: lpique@chromium.org
lpique@, please make sure #12 is merged to 62.
Project Member

Comment 14 by sheriffbot@chromium.org, Sep 25 2017

Labels: -Merge-Request-62 Merge-Review-62
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-62 Merge-Approved-62
Approved for 62. 
Project Member

Comment 16 by bugdroid1@chromium.org, Sep 28 2017

Labels: -merge-approved-62 merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e061006f3cff3786201fee52515a3e06429a678f

commit e061006f3cff3786201fee52515a3e06429a678f
Author: David Reveman <reveman@chromium.org>
Date: Thu Sep 28 22:49:05 2017

exo: Fix issues with viewports and transforms

The crop rectangle is set via the Wayland interface in post-transform
buffer coordinates. To generate UV coordinates, the crop rectangle must
be transformed by the inverse transform.

The forward transformation from "buffer" pixel space to target space
also turned out to be incorrect when there was a crop, there was no
viewport, and the buffer transformation was 90 or 270. The construction
of that transformation matrix now makes sense, unlike before.

The fixed up code shares a common buffer transformation matrix (rotating
in normalized coordinates around 0.5, 0.5), but that is all that can be
shared. The two transformations otherwise apply different scaling and
translations to get to their respective coordinate spaces otherwise.

Correct functionality was verified with a test app that sets a crop
rectangle while also setting/disabling the viewport rectangle, while
cycling through buffers at different rotations. The test app was run on
Chrome OS as well as under the Weston reference implementation.

BUG= 751232 
TBR=lpique@chromium.org

(cherry picked from commit 0a3045f2254a248df9ca4d0da2229ad62afdd1bb)

Change-Id: Ibca12b6d722891076db4cb053d133d128ee78889
Reviewed-on: https://chromium-review.googlesource.com/653494
Commit-Queue: Lloyd Pique <lpique@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#502440}
Reviewed-on: https://chromium-review.googlesource.com/685936
Cr-Commit-Position: refs/branch-heads/3202@{#495}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/e061006f3cff3786201fee52515a3e06429a678f/components/exo/surface.cc
[modify] https://crrev.com/e061006f3cff3786201fee52515a3e06429a678f/components/exo/surface.h
[modify] https://crrev.com/e061006f3cff3786201fee52515a3e06429a678f/components/exo/surface_unittest.cc

Components: OS>Kernel>Graphics
Labels: -Merge-Approved-61 Merge-Merged
Just a relabeling this bug.

Sign in to add a comment