Bug 202388 - [FTW] Correct additional canvas test failures
Summary: [FTW] Correct additional canvas test failures
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-30 19:08 PDT by Brent Fulgham
Modified: 2019-10-01 14:27 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.35 KB, patch)
2019-09-30 19:14 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (5.56 KB, patch)
2019-10-01 11:46 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-09-30 19:08:13 PDT
This patch cleans up a few errors in the Path and ImageData code causing some test failures.
Comment 1 Brent Fulgham 2019-09-30 19:14:00 PDT
Created attachment 379871 [details]
Patch
Comment 2 Fujii Hironori 2019-09-30 22:41:45 PDT
Comment on attachment 379871 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379871&action=review

> Source/WebCore/platform/graphics/win/Direct2DOperations.cpp:714
> +        auto transformedRectToClear = transform.mapRect(rectToClear);

mapRect returns a bounding rect if transform is rotated. Do you need to use fillPath?
Path path;
path.addRect(rect);
fillPath(platformContext, path, Color::transparent);
Comment 3 Brent Fulgham 2019-10-01 11:40:33 PDT
Comment on attachment 379871 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379871&action=review

>> Source/WebCore/platform/graphics/win/Direct2DOperations.cpp:714
>> +        auto transformedRectToClear = transform.mapRect(rectToClear);
> 
> mapRect returns a bounding rect if transform is rotated. Do you need to use fillPath?
> Path path;
> path.addRect(rect);
> fillPath(platformContext, path, Color::transparent);

Oh! Good point. I'll simplify the high-level Path commands to the appropriate D2D set for this use case, and only do this when we are not translating.

It seems like this path is only needed if the transform is not axis-aligned.
Comment 4 Brent Fulgham 2019-10-01 11:46:23 PDT
Created attachment 379920 [details]
Patch
Comment 5 Brent Fulgham 2019-10-01 11:53:59 PDT
Before this change:

    681 / 775 Pass

After this change:

    684 / 775 Pass
Comment 6 WebKit Commit Bot 2019-10-01 14:26:13 PDT
Comment on attachment 379920 [details]
Patch

Clearing flags on attachment: 379920

Committed r250581: <https://trac.webkit.org/changeset/250581>
Comment 7 WebKit Commit Bot 2019-10-01 14:26:15 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-10-01 14:27:17 PDT
<rdar://problem/55889950>