rotate(*deg) transformation caused blurring
Reported by
i...@elookon.de,
Jul 29 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36 Steps to reproduce the problem: See below What is the expected behavior? What went wrong? Using of 'transform: rotate(*deg)' normally causes blurring. After in a split second Chrome removes this blurring with an internal filter, resharpening, or something like that. That is the normal behaviour, so not a bug (also when I am not sure if it would be possible to apply this filter immediately, maybe a performance issue). The bug is: In my example the filter is only applied in parts. As you see in the example the sentences in the main area are sharp when rotated. But in the footer it stays blurry. In Mozilla Firefox all is correct. You can test it here: https://goo.gl/qxS983 htaccess login: google:dev Did this work before? N/A Does this work in other browsers? Yes Chrome version: 60.0.3112.78 Channel: stable OS Version: 10.0 Flash Version:
,
Jul 31 2017
To avoid confusion: URL to the test page is: https://goo.gl/wLWgDp And you have to use 'google' for username and 'dev' for password (both without single quotes) :)
,
Aug 1 2017
Blurriness seems like a paint issue to me? Changing component to Blink>Paint
,
Aug 1 2017
Able to reproduce the issue on windows 10 & 7 , ubuntu 14.04 and mac os 10.12.5 using chrome M60 #60.0.3112.78 and canary M62 #62.0.3173.2 . This is a regression issue broken in M51 . Using the per-revision bisect providing the bisect results, Good build: 51.0.2694.0 (Revision: 383878). Bad build: 51.0.2696.0 (Revision: 384437). You are probably looking for a change made after 384056 (known good), but no later than 384058 (first known bad). CHANGELOG URL: The script might not always return single CL as suspectas some perf builds might get missing due to failure. https://chromium.googlesource.com/chromium/src/+log/be0116796008e81aa179f6e41fe05f5225ff1c6a..9174f59cb6a861a48f89aff2fd89d2f07a832e0a Suspect : https://chromium.googlesource.com/chromium/src/+/9174f59cb6a861a48f89aff2fd89d2f07a832e0a From the CL above, assigning the issue to the concern owner @chrishtr- Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Review URL: https://codereview.chromium.org/1835833005 Thanks!
,
Aug 1 2017
This is probably WontFix. The blamed change affects what content gets what layers and presumably now the rotated content is getting its own layer when maybe before it wasn't. Hence the rotation is only applied to the actually rotated content. Note to the reporter. The blurriness is due to the compositor's behavior on composited layers. The layer is rendered without the rotation and then rotated. The re-sampling associated with the rotation causes it to blur. It may also be due to sub-pixel text rendering being on or off for different layers.
,
Aug 1 2017
I am not sure if I understand correct. But please have a look to the above screenshot. Chrome should be able to do it without blurriness or am I wrong? Otherwise the feature 'rotate' would be freakish and I personally would have to avoid using it.
,
Aug 1 2017
Ultimately we are trading off speed for quality. Transforms are frequently used in animated content where it is important to paint fast, and less important to render at highest quality. Firefox might be making different trade-offs or using different re-sampling methods. We do tend to be a bit blurry in my opinion.
,
Aug 1 2017
I understand your argument. For animations it is fully correct as they do not need to be sharpened while animating. What I do not understand is the inconsistency because most get sharpened (please have a look to the logo of the page which is rotated but very nice sharpened) but the footer area is extremely blurry (look at the red debug info). Transformations are also used for static contents. If there is a technical reason that hinder consistency, is there a filter/option for static contents to initiate the final sharpening event? Like '-x-chrome-filter: resharpen'?
,
Aug 1 2017
For text in particular, avoiding post-rasterization transforms is important for readability. Text looks good iff Skia rasterizes with the correct/final CTM (modulo integral translations). In this case, I believe schenney's analysis is correct: the content is rasterized without rotation into its own layer, and then transformed during compositing. This is super bad for text - not only we destroy any hinting during post-transformation filtering, but the layerization also seems to disable subpixel rendering. I tend to agree with the reporter though, in that this layerization choice doesn't make sense for static content -- plus it appears to be a regression.
,
Aug 1 2017
And as I understand it right Chrome also uses the "periods of rest" to sharpen the rotated contents so there shouldn't be any performance issue. So if you look at the other rotated texts and the graphic svg logo which are sharp you will see them first to be blurry when you visit the page and then sharpened after about 500 ms (roughly estimated). However the blurry contents in the footer seem to be quite forgotten.
,
Aug 1 2017
Chrome did have a sharpness timer (called ImageQualityController internally) but it has been recently removed. We should now draw images with the same quality during and after animations.
,
Aug 1 2017
In the current version or soon? Because currently during the animation it is blurry. It is sharpened 500-1000ms after animation has ended: Have a look to the logo animation: https://goo.gl/wLWgDp Username: google Password: dev
,
Aug 1 2017
The sharpness timer / ImageQualityController was removed in Chrome 61 which is currently in Dev and Canary channels only. It was paired with a change to always use the high quality resize code so it should be a strict improvement. I just wanted to note that it was removed since you mentioned it; I don't think that change is related to the blurriness in this bug.
,
Aug 1 2017
Ah okay, thank you for the information!
,
Aug 1 2017
> always use the high quality resize code Does this mean it actually rasterizes using the correct (full and final) transformation while animating or that it rasterizes at some nominal transform and then uses a "high quality" raster transform? I'm interested, because in general a "high quality" raster transform will look even worse (more blurry) for text than a "low quality" one.
,
Aug 1 2017
@bungeman, the 500ms snapping that backeschwein noticed was just for images and was because because we previously switched resampling algorithms during animations. The raster scale decision (good or bad) has not changed. For animations in general, I think we the raster scale is set to the scale of the beginning or end of the animation, whichever is larger.
,
Aug 1 2017
,
Aug 1 2017
The 1deg rotation layer is composited because of https://codereview.chromium.org/1835833005, which turns off squashing for non-2D translation transform. At the time, this was because it was too hard to implement the correct semantics for interest rects, but now that SPInvalidation has launched, I think it is straightforward. Will give it a go. Decreasing to Pri-2 though, because this is not a stable regression from M60.
,
Sep 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/707023d380f9c090b21bce9d0f4cb502cce2858a commit 707023d380f9c090b21bce9d0f4cb502cce2858a Author: Chris Harrelson <chrishtr@chromium.org> Date: Tue Sep 12 02:36:14 2017 Fix interest rect computation for squashed layers under transform. Instead of using one of the squashed layers as the starting point, use the transformed ancestor, from which we have already computed an offset to the squashing layer. As a result, remove the squashing-prevention rule about non-translation transforms. Bug: 750433 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I4cf1fc5a2e34d7e40023d4c3481bb517c3b6e72f Reviewed-on: https://chromium-review.googlesource.com/658335 Reviewed-by: Tien-Ren Chen <trchen@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#501157} [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-container-expected.txt [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-with-scale-transform.html [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-expected.txt [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-child-expected.txt [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.cpp [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.h [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/Source/core/paint/compositing/CompositingLayerAssigner.cpp [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp [modify] https://crrev.com/707023d380f9c090b21bce9d0f4cb502cce2858a/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h
,
Sep 12 2017
,
Jun 28 2018
It seems the bug has came back after the recent update.
,
Jun 29 2018
If the bug has returned after being absent, please open a new issue. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by i...@elookon.de
, Jul 29 2017