[Webkit-unassigned] [Bug 95258] Add support for blendmode to webkit rendering engine

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 29 13:07:01 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=95258





--- Comment #5 from Rik Cabanier <cabanier at adobe.com>  2012-08-29 13:07:03 PST ---
(In reply to comment #3)
> (From update of attachment 161090 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=161090&action=review
> 
> > Source/WebCore/ChangeLog:12
> > +        No new tests (OOPS!).
> 
> OOPS
> 
> This patch does change behavior: it makes compositing layers for blending, so this should be tested.

I added a test to the patch

> 
> > Source/WebCore/rendering/RenderInline.h:128
> > +    virtual bool requiresLayer() const { return isInFlowPositioned() || isTransparent() || hasMask() || hasFilter() || hasBlendMode(); }
> 
> It might be worth making a method on RenderObject for hasMask() || hasFilter() || hasBlendMode(), since these all have similar effects.

I added a helper method to RenderObject.

> 
> > Source/WebCore/rendering/RenderLayerBacking.cpp:963
> >  {
> > -    return style->hasBorder() || style->hasBorderRadius() || style->hasOutline() || style->hasAppearance() || style->boxShadow() || style->hasFilter();
> > +    return style->hasBorder() || style->hasBorderRadius() || style->hasOutline() || style->hasAppearance() || style->boxShadow() || style->hasFilter() || style->hasBlendMode();
> >  }
> 
> I'm not sure this is correct. We use hasBoxDecorations() to tell if we need backing store, but I don't think the blend mode needs to affect that answer.

You were right. This wasn't needed.

> 
> > Source/WebCore/rendering/RenderLayerCompositor.cpp:1484
> > +        || renderer->hasBlendMode())
> 
> Again, not sure if this is true for all platforms. I don't think we need backing store for CA to do blending.

I verified that it was needed in this case. Blending is just like opacity so it should follow the same logic.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list