[webkit-reviews] review granted: [Bug 84460] [CSS Filters] Move m_filter and related fields from RenderLayer to a different structure and only allocate it when needed : [Attachment 138467] Patch V2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 23 17:50:48 PDT 2012


Dean Jackson <dino at apple.com> has granted Chiculita Alexandru
<achicu at adobe.com>'s request for review:
Bug 84460: [CSS Filters] Move m_filter and related fields from RenderLayer to a
different structure and only allocate it when needed
https://bugs.webkit.org/show_bug.cgi?id=84460

Attachment 138467: Patch V2
https://bugs.webkit.org/attachment.cgi?id=138467&action=review

------- Additional Comments from Dean Jackson <dino at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=138467&action=review


Some small questions.

> Source/WebCore/rendering/RenderLayer.cpp:313
>  bool RenderLayer::requiresFullLayerImageForFilters() const 
>  {
> -    // FIXME: This can be optimized to enlarge the repaint rect exactly with
the amount that is going to be used.
> -    // https://bugs.webkit.org/show_bug.cgi?id=81263
> -    return paintsWithFilters() && filter() &&
filter()->hasFilterThatMovesPixels();
> +    if (!paintsWithFilters())
> +	   return false;
> +    FilterEffectRenderer* filter = filterRenderer();
> +    return filter ? filter->hasFilterThatMovesPixels() : false;
>  }

Why change this?  I guess because filterRenderer() is a little more complex
now?

> Source/WebCore/rendering/RenderLayer.h:56
> -#if ENABLE(CSS_FILTERS)
> -#include "FilterEffectObserver.h"
> -#endif
>  #include "PaintInfo.h"
>  #include "RenderBox.h"
>  #include "ScrollableArea.h"
>  #include <wtf/OwnPtr.h>
>  
> +#if ENABLE(CSS_FILTERS)
> +#include "FilterEffectObserver.h"
> +#include "RenderLayerFilterInfo.h"
> +#endif
> +

I'm not sure about the style rules here. It might not be strict. Do other files
guard include blocks with ENABLE?

> Source/WebCore/rendering/RenderLayerFilterInfo.h:38
> +#if ENABLE(CSS_FILTERS)
> +#include "LayoutTypes.h"
> +
> +#include <wtf/HashMap.h>
> +#include <wtf/PassRefPtr.h>
> +#include <wtf/RefPtr.h>

Typically it is a space after the ENABLE and then the includes are grouped
together.

> Source/WebCore/rendering/RenderLayerFilterInfo.h:55
> +    void addDirtySourceRect(const LayoutRect& rect) {
m_dirtySourceRect.unite(rect); }

Maybe this should be expandDirtySourceRect? What do you think?


More information about the webkit-reviews mailing list