2013-01-18  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLProgram::finishCallback conformance test crashes.
        Issue #77

        Reviewed by NOBODY (OOPS!).

        When WebCLProgram::build() api is called with a callback event.
        The call back is not registered and thus the static cast fails.
        Adding null check on the pointer to avoid crash if static fails due to other issues.

        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::finishCallback): Add null check.
        (WebCore::WebCLProgram::build): Register the object into file level static for use in finishCallback.
2013-01-24  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLDevice interface cleanup.
        Issue #91

        Reviewed by Antonio.

        Webkit style issues and cleanup of WebCLDevice interface.

        No new tests.

        * Modules/webcl/WebCLDevice.cpp:
        (WebCore::WebCLDevice::create):
        (WebCore::WebCLDevice::WebCLDevice):
        (WebCore::WebCLDevice::getInfo):
        (WebCore::WebCLDevice::getCLDevice):
        * Modules/webcl/WebCLDevice.h:
        (WebCLDevice):
        * Modules/webcl/WebCLDevice.idl:
        * platform/ComputeTypes.h:
2013-01-24  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLSampler interface cleanup.
        Issue #92

        Reviewed by Antonio.

        Webkit style issues and cleanup of WebCLSampler interface.

        No new tests.

        * Modules/webcl/WebCLSampler.cpp:
        (WebCore::WebCLSampler::~WebCLSampler):
        (WebCore::WebCLSampler::create):
        (WebCore::WebCLSampler::WebCLSampler):
        (WebCore::WebCLSampler::getInfo):
        (WebCore::WebCLSampler::getCLSampler):
        * Modules/webcl/WebCLSampler.h:
        (WebCLSampler):
        * Modules/webcl/WebCLSampler.idl:
2013-01-31  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLCommandQueue check pointers to avoid bad memory access.
        Issue #98

        Reviewed by NOBODY (OOPS!).

        Error can be thrown by WebCL or a null passed to OpenCL.
        If OpenCL needs a non-null value it will throw a exception which will
        be handled by WebCL.

        No new tests (OOPS!).

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::enqueueWriteBuffer):
        (WebCore::WebCLCommandQueue::enqueueWriteBufferRect):
        (WebCore::WebCLCommandQueue::enqueueReadImage):
        (WebCore::WebCLCommandQueue::enqueueReadBuffer):
        (WebCore::WebCLCommandQueue::enqueueReadBufferRect):
        (WebCore::WebCLCommandQueue::enqueueNDRangeKernel):
        (WebCore::WebCLCommandQueue::enqueueWriteImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImageToBuffer):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferToImage):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferRect):
        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::createImageWithDescriptor):
2013-02-01  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLEvent interface cleanup.
        Issue #103

        Reviewed by NOBODY (OOPS!).

        Fix webkit style issues and cleanup WebCLEvent interface files.

        No new tests (OOPS!).

        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::createUserEvent):uncomment the code since it will work after WebCLEvent cleanup.
        * Modules/webcl/WebCLEvent.cpp:
        (WebCore::WebCLEvent::~WebCLEvent):
        (WebCore::WebCLEvent::create):
        (WebCore::WebCLEvent::WebCLEvent):
        (WebCore::WebCLEvent::getInfo):
        (WebCore::WebCLEvent::getProfilingInfo):
        (WebCore::WebCLEvent::setUserEventStatus):
        (WebCore):
        (WebCore::WebCLEvent::setCallback):
        (WebCore::WebCLEvent::getCLEvent):
        * Modules/webcl/WebCLEvent.h:
        (WebCLEvent):
        * Modules/webcl/WebCLEvent.idl:
        * bindings/js/JSWebCLEventCustom.cpp:
        (WebCore::createFinishCallback):
        (WebCore::JSWebCLEvent::getInfo):
        (WebCore::JSWebCLEvent::getProfilingInfo):
        (WebCore::JSWebCLEvent::setCallback):
        * platform/ComputeTypes.h:
2013-02-01  Sharath Kamath  <kamath.sharath@gmail.com>

        ComputeContextCL::computeMemoryTypeToCL doesnt handle HOST_PTR flags.
        Issue #104

        Reviewed by NOBODY (OOPS!).

        Need to add support to CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR, CL_MEM_COPY_HOST_PTR flags.
        Gives a INVALID_HOST_POINTER with createImage API when a Image element is passes as i/p.

        No new tests.

        * platform/ComputeContext.h:
        * platform/opencl/ComputeContextCL.cpp:
        (WebCore::computeMemoryTypeToCL):
        (WebCore):
2013-02-01  Sharath Kamath  <kamath.sharath@gmail.com>

        createSubBuffer() API crashes the safari browser.
        Issue #105

        Reviewed by NOBODY (OOPS!).

        On running the conformance test case to getInfo on MEM_ASSOCIATED_MEMOBJECT flag , the browser crashes.
        The stack reports crash in ~WebCLMemoryObject.
        Need to investigate the way the desctructor is called for a sub buffer as a subbuffer
        is also WebCLMemoryObject. And it depends on the cl_mem of the WebCLMemoryObject on using which it was created.

        The subbuffer will have a reference count heigher than 1. Thus can check it before calling clRelease.

        No new tests.

        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::~WebCLMemoryObject):
2013-02-04  Sharath Kamath  <kamath.sharath@gmail.com>

        WebCLMemoryObject::getInfo must also support all associated flags.
        Issue #83

        Reviewed by NOBODY (OOPS!).

        The flags MEM_FLAGS ,MEM_ASSOCIATED_MEMOBJECT, MEM_OFFSET needs to be supported and
        the suport for CL_MEM_HOST_PTR and CL_MEM_MAP_COUNT must be revocked as per specification.

        Also add suport for WebCLMemoryObject to WebCLGetInfo class.

        No new tests.

        * Modules/webcl/WebCLGetInfo.cpp:
        (WebCore::WebCLGetInfo::WebCLGetInfo):
        (WebCore):
        (WebCore::WebCLGetInfo::getWebCLMemoryObject):
        * Modules/webcl/WebCLGetInfo.h:
        (WebCore):
        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::getInfo):
        * bindings/js/JSWebCLCustom.h:
        (WebCore::toJS):
        * platform/ComputeTypes.h: