Summary: | Garbage is displayed when root svg element has mix-blend-mode set | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | kari.pihkala | ||||||||||||
Component: | SVG | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, kondapallykalyan, sabouhallawa, simon.fraser, webkit-bug-importer, zalan, zimmermann | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
kari.pihkala
2015-10-26 06:01:41 PDT
> (possibly unallocated memory?)
I meant uninitialized :) Also, the svg document needs to be opened as a top level document.
Created attachment 269719 [details]
Patch
Comment on attachment 269719 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=269719&action=review > Source/WebCore/ChangeLog:15 > + In SVGRenderingContext::prepareToRenderSVGContent(), the clip() is called > + before beginTransparencyLayer() which calls save(). We need to move this > + call after the call to beginTransparencyLayer() to ensure the clipping will > + be restored to its previous state when endTransparencyLayer() is called in > + the destructor of SVGRenderingContext. This is surprising. I thought that: 1) setting a clip before calling beginTransparencyLayer reduces the amount of memory that has to be allocated in order to create a transparency layer 2) endTransparencyLayer does not guarantee a restore I was probably wrong about (2), but was I wrong about (1)? Can we just add another save/restore instead? Comment on attachment 269719 [details]
Patch
This seems like the wrong approach. I think what's missing is a save/restore around setting the clip.
Created attachment 269967 [details]
Patch
Created attachment 269968 [details]
Another test case
Yes I took a wrong approach in the previous patch. I was trying that patch on WK1 with test cases which do not force compositing. These test cases did not produce the bug with or without the patch. Created attachment 269978 [details]
One more test case
Comment on attachment 269967 [details] Patch Clearing flags on attachment: 269967 Committed r195724: <http://trac.webkit.org/changeset/195724> All reviewed patches have been landed. Closing bug. |