[webkit-reviews] review denied: [Bug 107444] Add error checking into OpenCL version of SVG filters. : [Attachment 184446] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 28 00:56:40 PST 2013


Zoltan Herczeg <zherczeg at webkit.org> has denied Tamas Czene
<tczene at inf.u-szeged.hu>'s request for review:
Bug 107444: Add error checking into OpenCL version of SVG filters.
https://bugs.webkit.org/show_bug.cgi?id=107444

Attachment 184446: proposed patch
https://bugs.webkit.org/attachment.cgi?id=184446&action=review

------- Additional Comments from Zoltan Herczeg <zherczeg at webkit.org>
Nice patch, but some minor fixes are needed:

View in context: https://bugs.webkit.org/attachment.cgi?id=184446&action=review


> Source/WebCore/ChangeLog:3
> +	   Add error checking into OpenCL version of SVG filters.

Could you add a little more description what this patch does?

> Source/WebCore/platform/graphics/filters/FilterEffect.cpp:484
> +    int errorCode;

Is this error code set to 0 if an error occures?

> Source/WebCore/platform/graphics/filters/FilterEffect.cpp:515
> +	   if (context->inError())
> +	       return;
>	   context->openCLTransformColorSpace(m_openCLImageResult,
absolutePaintRect(), m_resultColorSpace, dstColorSpace);

I think this error check should be done by openCLTransformColorSpace.

> Source/WebCore/platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:96
> +	   deleteResource(m_matrixOperation);

freeResource?

> Source/WebCore/platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:112
> +	   deleteResource(m_transformColorSpaceKernel);
> +	   deleteResource(m_transformColorSpaceProgram);
> +

Extra newline

> Source/WebCore/platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:183
> +    m_transformColorSpaceCompileStatus = openclCompileSuccessful;

What about partially completed compilations? I think the 3 states of these
status flags are not necessary anymore after we introduced the error status of
the context. They should be simply bools, and tell whether the compilation was
attempted.

> Source/WebCore/platform/graphics/gpu/opencl/FilterContextOpenCL.h:173
> +    static void deleteResource(cl_kernel);
> +    static void deleteResource(cl_program);

Shouldn't these accept references? (cl_kernel& and cl_program&) Otherwise the =
0 has no effect. Furthermore these fuctions should be inline.

> Source/WebCore/platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:176
> +    if (inError())
> +	   return;
> +
>      if (m_turbulenceCompileStatus != openclNotCompiledYet)
> -	   return m_turbulenceCompileStatus == openclCompileSuccessful;
> +	   return;

These two can be combined together, and likely the first one is not needed at
all.


More information about the webkit-reviews mailing list