Garbage overlaying reply bar in gmail |
|||||||||||||
Issue description1. Run chrome with --enable-prefer-compositing-to-lcd-text 2. Load gmail 3. Load a wide email that causes a horizontal scrollbar 4. Click on the quick reply area Expected: shows the icons for file attachment, font, etc. Actual: all of the icons show up on top of each other over the "send" button" What happens is we have a sequence of element subtrees like this (one for each of the action icons in the reply bar): <div id=":nq" class="e5 aaA aMZ" style="user-select: none;/* opacity: 1; *//* overflow: hidden; */"> <div class="a3I" style="user-select: none;/* will-change: transform; */"> </div> </div> The ":nq" element has the actual background image. It has a position:absolute child that is 1px x 1px with a non-breaking space in it. The child causes extra composited layers due to possible overlap with the scroller for the email reply, and because there are more than one of the ":nq" elements, it triggers a new render surface cc to blend multiple opacity descendants.
,
Dec 7 2016
Must load with --enable-prefer-compositing-to-lcd-text I think.
,
Dec 7 2016
Ali could you look? Something is up maybe in the property trees? Tien-ren also thinks this is perhaps related to crbug.com/664091 . This is a high priority bug for gmail. See internal issue 32060115.
,
Dec 7 2016
This repros on Linux with --enable-prefer-compositing-to-lcd-text, but not on Mac. Not yet sure if the layer tree is somehow different on Mac. At first glance, this looks like bad draw transforms or drawable content rects. Need to minimize the test some more first.
,
Dec 7 2016
Bisected to https://codereview.chromium.org/1960543002 ("Optimize render passes with single quads").
,
Dec 7 2016
I think I know what's happening. The render pass optimization from #5 works correctly when the texture for the single quad is of the same size as the texture we would get for the render pass if we didn't optimize it out (since when the optimization is enabled for a pass, GLRenderer::DrawRenderPassQuad uses the quad's texture in place of the pass' texture). GLRenderer::CanPassBeDrawnDirectly does check if the quad is positioned at the pass' origin. But in the buggy case the pass' own output_rect's origin isn't (0, 0) in its space, it instead has negative x and y coordinates. e.g. the pass' output rect is -56,-20 77x41, while the quad rect in pass space is 0,0 21x21. So then we're taking the quad's 21x21 texture and positioning it the way we'd position the 77x41 texture for the pass, which means the quad's content is shifted up and to the left, since it's actually being drawn at -56,20 in pass space instead of at 0,0. The safest fix (particularly for merging back) would be to add this case (the quad rect being different from the the pass' output rect) to list of conditions that GLRenderer::CanPassBeDrawnDirectly blacklists.
,
Dec 7 2016
Also, GLRenderer::CanPassBeDrawnDirectly always returns false on Mac, which explains why this bug doesn't repro there.
,
Dec 7 2016
,
Dec 8 2016
Issue 664091 has been merged into this issue.
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7faf8fc181b5d98c6007495a8944ff0be3aeeb90 commit 7faf8fc181b5d98c6007495a8944ff0be3aeeb90 Author: ajuma <ajuma@chromium.org> Date: Fri Dec 09 01:17:17 2016 cc: Only use single quad pass optimization when quad rect matches pass rect GLRenderer::CanPassBeDrawnDirectly checks if a pass' only quad is positioned at (0, 0) in pass space, but this doesn't guarantee that the quad will be positioned at the top left corner of the pass' texture, since the pass' own texture isn't necessarily positioned at (0, 0) in pass space. In this situation, using the quad's texture in place of the pass's texture results in incorrect positioning of the quad's contents. To fix this, this CL adds a check that the quad rect matches the pass' output rect. BUG= 671773 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2558393002 Cr-Commit-Position: refs/heads/master@{#437402} [modify] https://crrev.com/7faf8fc181b5d98c6007495a8944ff0be3aeeb90/cc/output/gl_renderer.cc [add] https://crrev.com/7faf8fc181b5d98c6007495a8944ff0be3aeeb90/cc/test/data/translated_blue_green_alpha_gl.png [add] https://crrev.com/7faf8fc181b5d98c6007495a8944ff0be3aeeb90/cc/test/data/translated_blue_green_alpha_sw.png [modify] https://crrev.com/7faf8fc181b5d98c6007495a8944ff0be3aeeb90/cc/trees/layer_tree_host_pixeltest_filters.cc
,
Dec 9 2016
Can we please add the proper OS tags here?
,
Dec 9 2016
,
Dec 9 2016
,
Dec 10 2016
Your change meets the bar and is auto-approved for M56 (branch: 2924)
,
Dec 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b51cb6ccaf15340a6fb968f61b907bd17fd15d81 commit b51cb6ccaf15340a6fb968f61b907bd17fd15d81 Author: Ali Juma <ajuma@chromium.org> Date: Mon Dec 12 15:29:05 2016 cc: Only use single quad pass optimization when quad rect matches pass rect GLRenderer::CanPassBeDrawnDirectly checks if a pass' only quad is positioned at (0, 0) in pass space, but this doesn't guarantee that the quad will be positioned at the top left corner of the pass' texture, since the pass' own texture isn't necessarily positioned at (0, 0) in pass space. In this situation, using the quad's texture in place of the pass's texture results in incorrect positioning of the quad's contents. To fix this, this CL adds a check that the quad rect matches the pass' output rect. BUG= 671773 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2558393002 Cr-Commit-Position: refs/heads/master@{#437402} (cherry picked from commit 7faf8fc181b5d98c6007495a8944ff0be3aeeb90) Review-Url: https://codereview.chromium.org/2568133002 . Cr-Commit-Position: refs/branch-heads/2924@{#454} Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059} [modify] https://crrev.com/b51cb6ccaf15340a6fb968f61b907bd17fd15d81/cc/output/gl_renderer.cc [add] https://crrev.com/b51cb6ccaf15340a6fb968f61b907bd17fd15d81/cc/test/data/translated_blue_green_alpha_gl.png [add] https://crrev.com/b51cb6ccaf15340a6fb968f61b907bd17fd15d81/cc/test/data/translated_blue_green_alpha_sw.png [modify] https://crrev.com/b51cb6ccaf15340a6fb968f61b907bd17fd15d81/cc/trees/layer_tree_host_pixeltest_filters.cc
,
Dec 12 2016
,
Dec 14 2016
Verified this issue on Mac 10.12.1, Win-10 and Ubuntu 14.04 using chrome beta version #56.0.2924.28 as per comment #1 and #2. Observed that the fix is working as expected. Attaching screencast for reference. Hence, adding the verified labels.
,
Jan 25 2017
|
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by chrishtr@chromium.org
, Dec 7 2016