2013-11-11  Sharath Kamath  <s.kamath@samsung.com>

        Add support to Callback for WebCLProgram::build() API.

        Issue #299

        Reviewed by NOBODY (OOPS!).

        OpenCL buildProgram() supports a callback functionality, where the users can call
        a buildProgram asynchronously. The same needs to be supported for WebCLProgram::build(...)  API.

        OpenCL returns to the callback with 2 params, OpenCL program object (CCProgram) and userData.
        With WebCL, we need to Map the CCProgram to the corresponding WebCLProgram object and call the
        webkit call back, handleEvent() api.

        Conformance test cases:
        conformance/basicoperations/cl_program_build.html
        conformance/functionalityTesting/buildCallback.html
        [https://github.com/SRA-SiliconValley/webkit-webcl-conformance]

        * DerivedSources.make:
        * Modules/webcl/WebCLCallback.h: Renamed from Source/WebCore/Modules/webcl/WebCLFinishCallback.h.
        (WebCore::WebCLCallback::~WebCLCallback):
        * Modules/webcl/WebCLCallback.idl: Renamed from Source/WebCore/Modules/webcl/WebCLFinishCallback.cpp.
        * Modules/webcl/WebCLCommandQueue.h:
        * Modules/webcl/WebCLEvent.cpp:
        (WebCore::WebCLEvent::setCallback):
        * Modules/webcl/WebCLEvent.h:
        * Modules/webcl/WebCLEvent.idl:
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::WebCLProgram):
        (WebCore::WebCLProgram::callbackProxy):
        (WebCore::WebCLProgram::build):
        * Modules/webcl/WebCLProgram.h:
        (WebCore::WebCLProgram::callEvent):
        * Modules/webcl/WebCLProgram.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSCustomWebCLFinishCallback.cpp:
        * bindings/js/JSWebCLCommandQueueCustom.cpp:
        (WebCore::JSWebCLCommandQueue::finish):
        * bindings/js/JSWebCLEventCustom.cpp:
        (WebCore::createCallback):
        (WebCore::JSWebCLEvent::setCallback):
        * bindings/js/JSWebCLProgramCustom.cpp:
        (WebCore::createCallback):
        (WebCore::JSWebCLProgram::build):
        * platform/ComputeContext.h:
        * platform/opencl/ComputeContextCL.cpp:
        (WebCore::ComputeContext::buildProgram):
2013-11-11  Afonso R. Costa Jr.  <afonso.costa@samsung.com>

        Add Layout Test for WebCLProgram::build with optional WebCLCallback.
        Issue #131

        Reviewed by NOBODY (OOPS!).

        * webcl/tests/webcl-test-program-build-with-callback-expected.txt: Added.
        * webcl/tests/webcl-test-program-build-with-callback.html: Added.