New issue
Advanced search Search tips

Issue 868779 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Scaling image transition performance and rendering artifacts

Reported by diiiima...@gmail.com, Jul 30

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3506.0 Safari/537.36

Steps to reproduce the problem:
The issue in Chrome Canary 70.0.3506.0, stable works ok.

When scaling up an image via transform:scale() thin 1px semi-transparent line appears either on bottom or right side (or both). This often happens during transition or when switching to another tab and going back.

Image scaling transition is also generally slower comparing to the stable version of Chrome. It feels like it drops frames, even though dev tools performance tab shows that all frames are clean and no work done in the middle of a transition. 

I recorded short screengrab https://www.youtube.com/watch?v=85uf_PPpjKU , it seems to catch the issue, just watch in 720p60fps and look at the bottom part of each image.

- The first example from video http://jsfiddle.net/dfwm9j6s/embedded/result/ (click on the image to run scale animation, then switch tabs back and forth)
- Second example http://photoswipe.com (the line will appear in the middle of transition).
- The third example is local (line flashes in the middle of transition), but I can upload it somewhere if you really need.

What is the expected behavior?

What went wrong?
-

Did this work before? Yes 

Does this work in other browsers? Yes

Chrome version: 70.0.3506.0  Channel: canary
OS Version: OS X 10.13.0
Flash Version:
 
Labels: -Pri-2 Needs-Bisect Pri-1
Labels: Needs-Triage-M70
Cc: danakj@chromium.org
Initial bisect is to https://chromium.googlesource.com/chromium/src/+log/4fd8a827a8b9c51cbedce4060ee7b841edeee3c5..c5f1009cd42d24d77fb811042815cf5d94c770fb

There are a couple of potential culprits but nothing screams liability.

CC danakj@ because "Move SetContentsOpaqueIsFixed() from WebLayer to GraphicsLayer" is the most likely candidate if the bisect is correct, but I thought the change was not affecting behavior at all.


I'll bisect again and check.
Cc: -danakj@chromium.org pdr@chromium.org enne@chromium.org
Components: -Blink>Image Internals>Compositing Blink>Compositing
Labels: -Needs-Bisect
Status: Available (was: Unconfirmed)
Bisect reproduces.

I'm suspecting https://chromium.googlesource.com/chromium/src/+/e1b6426ea838e2c0dc2d2b1893c5873cce1e53ac because nothing in the Skia roll seems to account for this. enne@, pdr@, as reviewers of the patch could you take a look, and maybe try to revert, to see if the blame is right. danajk@ is out for a while.
Owner: pdr@chromium.org
Status: Assigned (was: Available)
This is an M68 regression, mark as blocking?
The problem is transitional, so I am loath to make it blocking in any sense. That is, ugly but not site-breaking.
Blame certainly looks suspicious to me.  Opaque layers in cc (because they're opaque) end up getting the background color filled in on the bottom and right side to make sure they have opaque pixels when scaled.  So, this isn't too surprising to me.  I would probably say that this is the expected behavior for opaque layers.

However, I think the surprising thing is that this layer itself is marked as opaque.  Very few layers get marked as opaque in the renderer.  This line is the most suspicious to me as being a change in behavior (in that image layers do not seem to have been previously fixed):

SetContentsTo(image_layer_ ? image_layer_->Layer() : nullptr, true);
Right, image layers as far as I know are never opaque because we don't know enough about the image before we decode it for raster, or opaqueness is expensive to compute. There's a bug on this for Blink's opaqueness tracking for background painting optimization.

enne@, do you have a fix in mind or would you like to punt it over to the Blink compositor side?

Comment 9 Deleted

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 4

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

commit a9f679016c42686e2a688f9e95d7244aa693e45c
Author: Philip Rogers <pdr@chromium.org>
Date: Sat Aug 04 01:47:19 2018

Do not mark directly composited image layers as opaque

Due to https://crbug.com/870857, we cannot mark directly composited
image layers as opaque. https://crrev.com/556288 started setting
prevent_contents_opaque_changes_ for directly-composited image layers
which exposed this bug.

Bug:  868779 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9fb0fe4361bd8fd39529bbf698f7549edbc51faf
Reviewed-on: https://chromium-review.googlesource.com/1162750
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580725}
[modify] https://crrev.com/a9f679016c42686e2a688f9e95d7244aa693e45c/third_party/blink/renderer/platform/graphics/graphics_layer.cc
[modify] https://crrev.com/a9f679016c42686e2a688f9e95d7244aa693e45c/third_party/blink/renderer/platform/graphics/image_layer_chromium_test.cc

Comment 11 Deleted

Comment 12 Deleted

Comment 13 Deleted

Comment 14 Deleted

Labels: FoundIn-68 OS-Linux
Status: Fixed (was: Assigned)
I've attached a smaller testcase for verification. Lets let this bake for a few days and then consider merging into M69.
imagebug.html
679 bytes View Download
Labels: Merge-Request-69
The baking is smelling pretty good. Requesting merge onto the M69 plate.
Project Member

Comment 17 by sheriffbot@chromium.org, Aug 6

Labels: -Merge-Request-69 Merge-Review-69 Hotlist-Merge-Review
This bug requires manual review: M69 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), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
This is regressed in M68. How safe and critical is this to merge to M69?
This is pretty safe but not particularly critical. The only issue is a faint line on some images. Maybe we should not merge this after all.
Labels: -Merge-Review-69 Merge-Rejected-69
Rejecting merge to M69 based on comment #19. Thank you.

Sign in to add a comment