Bug 203613

Summary: The image is flashing if falls out and has an animation transform: rotate
Product: WebKit Reporter: Roman Kosov <bugs-webkit>
Component: CompositingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, graouts, koivisto, sabouhallawa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Mac   
OS: macOS 10.15   
See Also: https://bugs.webkit.org/show_bug.cgi?id=173732
Attachments:
Description Flags
image with animation transform: rotate = flashing
none
Reduced test case
none
Patch none

Description Roman Kosov 2019-10-30 09:39:41 PDT
Created attachment 382324 [details]
image with animation transform: rotate = flashing

The image is flashing if falls out and has an animation transform: rotate.

Preview: https://codepen.io/romankosov/full/GRRMPJJ
Code: https://codepen.io/romankosov/pen/GRRMPJJ

MacOS X: 10.15.1 Beta (19B86a)
Safri: Version 13.0.3 (15608.3.10.1.4)
Comment 1 Said Abou-Hallawa 2019-10-30 10:01:11 PDT
The flashing happens only when resizing the window or scrolling the page horizontally such that the image is partially visible. And it is not because of image decoding.
Comment 2 Radar WebKit Bug Importer 2019-10-30 10:01:25 PDT
<rdar://problem/56748028>
Comment 3 Simon Fraser (smfr) 2019-10-30 11:56:14 PDT
This is about backing store detachment.
Comment 4 Simon Fraser (smfr) 2019-11-13 17:33:48 PST
Created attachment 383525 [details]
Reduced test case
Comment 5 Simon Fraser (smfr) 2019-11-13 18:33:21 PST
This code is wrong:
    if (auto extent = animationExtent()) {
        // Adjust the animation extent to match the current animation position.
        bounds = rects.animatingTransform.inverse().valueOr(TransformationMatrix()).mapRect(*extent);
    }
Comment 6 Simon Fraser (smfr) 2019-11-13 18:35:04 PST
Antti added this code in r218735
Comment 7 Simon Fraser (smfr) 2019-11-13 18:39:55 PST
I don't think we need to map "extent" through the inverses of the current transform, because "extent" was computed as the union of all the possible bounds that result from the animation.
Comment 8 Simon Fraser (smfr) 2019-11-14 14:55:48 PST
Created attachment 383574 [details]
Patch
Comment 9 WebKit Commit Bot 2019-11-15 08:59:05 PST
Comment on attachment 383574 [details]
Patch

Clearing flags on attachment: 383574

Committed r252486: <https://trac.webkit.org/changeset/252486>
Comment 10 WebKit Commit Bot 2019-11-15 08:59:07 PST
All reviewed patches have been landed.  Closing bug.