[webkit-reviews] review denied: [Bug 91398] Fix blend filter for autovectorizing : [Attachment 153999] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 24 03:37:13 PDT 2012
Nikolas Zimmermann <zimmermann at kde.org> has denied Allan Sandfeld Jensen
<allan.jensen at nokia.com>'s request for review:
Bug 91398: Fix blend filter for autovectorizing
https://bugs.webkit.org/show_bug.cgi?id=91398
Attachment 153999: Patch
https://bugs.webkit.org/attachment.cgi?id=153999&action=review
------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=153999&action=review
Looks better, I still have some suggestions though:
> Source/WebCore/platform/graphics/filters/FEBlend.cpp:66
> +static inline unsigned char div255(uint16_t value)
nitpick: fastDivideBy255, to avoid abbreviations.
> Source/WebCore/platform/graphics/filters/FEBlend.cpp:124
> +template<typename BlendFunctor>
> +static void platformApply(unsigned char* sourcePixelA, unsigned char*
sourcePixelB,
> + unsigned char* destinationPixel, unsigned
pixelArrayLength)
I'm not sure why you need a templatified solution. I would have defined:
typedef void (*BlendModefunction)(uchar colorA, uchar colorB, uchar alphaA,
uchar alphaB)
for the use in
static void platformApply(uchar* sourcePixelA, uchar* sourcePixelB, uchar*
destPixel, unsigned pixelArrayLength, BlendModeFunction blendModeFunction)
{
...
destinationPixel[0] = (*blendModeFunction)(sourcePixelA....
}
This way you don't need to wrap the existing darken/lighten/.. methods in dummy
classes.
Please elaborate if I'm overlooking something which makes this impossible.
> Source/WebCore/platform/graphics/filters/FEBlend.cpp:160
> + platformApply<BlendUnknown>(sourcePixelA, sourcePixelB,
destinationPixel, pixelArrayLength);
If you go with my proposed solution above, you can pass 0 as function-pointer
here for the unknown case.
More information about the webkit-reviews
mailing list