Bug 209071

Summary: [GPU Process] GraphicsContextStateChange::apply() should process ShadowsIgnoreTransformsChange before processing ShadowChange
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: CanvasAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, dino, mmaxfield, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
test case
none
Patch none

Description Said Abou-Hallawa 2020-03-13 11:53:28 PDT
This because GraphicsContext::setPlatformShadow() checks the value of m_state.shadowsIgnoreTransforms. GraphicsContext::setPlatformShadow() is called from GraphicsContextStateChange::apply() via setLegacyShadow() or setShadow() when it detects a ShadowChange.
Comment 1 Said Abou-Hallawa 2020-03-13 11:55:53 PDT
Created attachment 393512 [details]
Patch
Comment 2 Said Abou-Hallawa 2020-03-13 11:58:36 PDT
Created attachment 393514 [details]
test case
Comment 3 Said Abou-Hallawa 2020-03-13 12:06:11 PDT
Repro steps:

1. Launch mini-browser
2. Enable "Settings/Internal Features/Render Canvas in GPU Process" or "Settings/Enable Display List Drawing".
3. Open the attached test case

Result: the test case shows a 100x100 green rectangle
Expected: the test case shows a 100x100 green rectangle with its shadow 100x100 red rectangle
Comment 4 Said Abou-Hallawa 2020-03-13 12:08:24 PDT
This patch fixes the following test cases when running "run-webkit-tests --internal-feature RenderCanvasInGPUProcessEnabled"

fast/canvas/canvas-image-shadow.html
fast/canvas/canvas-scale-drawImage-shadow.html
fast/canvas/canvas-scale-fillPath-shadow.html
fast/canvas/canvas-scale-fillRect-shadow.html
fast/canvas/canvas-scale-shadowBlur.html
fast/canvas/canvas-transforms-fillRect-shadow.html
fast/canvas/fillText-shadow.html
Comment 5 Darin Adler 2020-03-13 12:24:58 PDT
(In reply to Said Abou-Hallawa from comment #4)
> This patch fixes the following test cases when running "run-webkit-tests
> --internal-feature RenderCanvasInGPUProcessEnabled"
> 
> fast/canvas/canvas-image-shadow.html
> fast/canvas/canvas-scale-drawImage-shadow.html
> fast/canvas/canvas-scale-fillPath-shadow.html
> fast/canvas/canvas-scale-fillRect-shadow.html
> fast/canvas/canvas-scale-shadowBlur.html
> fast/canvas/canvas-transforms-fillRect-shadow.html
> fast/canvas/fillText-shadow.html

Change log should mention this.
Comment 6 Said Abou-Hallawa 2020-03-13 15:32:20 PDT
Created attachment 393540 [details]
Patch
Comment 7 WebKit Commit Bot 2020-03-13 18:28:03 PDT
Comment on attachment 393540 [details]
Patch

Clearing flags on attachment: 393540

Committed r258454: <https://trac.webkit.org/changeset/258454>
Comment 8 WebKit Commit Bot 2020-03-13 18:28:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2020-03-13 18:29:14 PDT
<rdar://problem/60442640>