2013-12-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        Introduces isPlatformObjectNeutralized

        Reviewed by NOBODY (OOPS!).

        WebCLObject::platformObject is not the best method to check
        against in order to "validate" a WebCL object.
        Reason: WebCLEvent objects can be a "valid" object that momentarely
        do not hold a valid CL platform object.

        Due to that, we now check if an object has been neutralized by
        an explict "release" call.

        Note that
        - WebCLPlatform and WebCLDevice classes override the release related
        methods, given that they can not be released.
        - WebCLEvent also overrides isPlatformObjectNeutralized, given its peculiar behavior
        (mentioned above).

        * Modules/webcl/WebCLBuffer.cpp:
        (WebCore::WebCLBuffer::createSubBuffer):
        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::getInfo):
        (WebCore::WebCLCommandQueue::enqueueWriteBufferBase):
        (WebCore::WebCLCommandQueue::enqueueWriteBufferRect):
        (WebCore::WebCLCommandQueue::enqueueReadBuffer):
        (WebCore::WebCLCommandQueue::enqueueReadImage):
        (WebCore::WebCLCommandQueue::enqueueReadBufferRect):
        (WebCore::WebCLCommandQueue::enqueueNDRangeKernel):
        (WebCore::WebCLCommandQueue::finish):
        (WebCore::WebCLCommandQueue::flush):
        (WebCore::WebCLCommandQueue::enqueueWriteImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImage):
        (WebCore::WebCLCommandQueue::enqueueCopyImageToBuffer):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferToImage):
        (WebCore::WebCLCommandQueue::enqueueCopyBuffer):
        (WebCore::WebCLCommandQueue::enqueueCopyBufferRect):
        (WebCore::WebCLCommandQueue::enqueueBarrier):
        (WebCore::WebCLCommandQueue::enqueueMarker):
        (WebCore::WebCLCommandQueue::enqueueAcquireGLObjects):
        (WebCore::WebCLCommandQueue::enqueueReleaseGLObjects):
        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::getInfo):
        (WebCore::WebCLContext::createCommandQueue):
        (WebCore::WebCLContext::createProgram):
        (WebCore::WebCLContext::createBufferBase):
        (WebCore::WebCLContext::createImage2DBase):
        (WebCore::WebCLContext::createSampler):
        (WebCore::WebCLContext::createUserEvent):
        (WebCore::WebCLContext::getSupportedImageFormats):
        (WebCore::WebCLContext::releaseAll):
        (WebCore::WebCLContext::createFromGLBuffer):
        (WebCore::WebCLContext::createFromGLRenderbuffer):
        (WebCore::WebCLContext::createFromGLTexture):
        * Modules/webcl/WebCLDevice.cpp:
        (WebCore::WebCLDevice::getInfo):
        * Modules/webcl/WebCLDevice.h:
        (WebCore::WebCLDevice::isPlatformObjectNeutralized):
        (WebCore::WebCLDevice::isReleased):
        (WebCore::WebCLDevice::release):
        (WebCore::WebCLDevice::releasePlatformObject):
        * Modules/webcl/WebCLEvent.cpp:
        (WebCore::WebCLEvent::getInfo):
        (WebCore::WebCLEvent::getProfilingInfo):
        (WebCore::WebCLEvent::isPlatformObjectNeutralized):
        * Modules/webcl/WebCLEvent.h:
        * Modules/webcl/WebCLImage.cpp:
        (WebCore::WebCLImage::getGLTextureInfo):
        (WebCore::WebCLImage::getInfo):
        * Modules/webcl/WebCLKernel.cpp:
        (WebCore::WebCLKernel::getInfo):
        (WebCore::WebCLKernel::getWorkGroupInfo):
        (WebCore::WebCLKernel::setArg):
        * Modules/webcl/WebCLKernel.idl:
        * Modules/webcl/WebCLMemoryObject.cpp:
        (WebCore::WebCLMemoryObject::getInfo):
        (WebCore::WebCLMemoryObject::getGLObjectInfo):
        * Modules/webcl/WebCLObject.h:
        (WebCore::WebCLObjectImpl::isPlatformObjectNeutralized):
        * Modules/webcl/WebCLPlatform.cpp:
        (WebCore::WebCLPlatform::getInfo):
        (WebCore::WebCLPlatform::getDevices):
        * Modules/webcl/WebCLPlatform.h:
        (WebCore::WebCLPlatform::isPlatformObjectNeutralized):
        (WebCore::WebCLPlatform::isReleased):
        (WebCore::WebCLPlatform::release):
        (WebCore::WebCLPlatform::releasePlatformObject):
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::getInfo):
        (WebCore::WebCLProgram::getBuildInfo):
        (WebCore::WebCLProgram::createKernel):
        (WebCore::WebCLProgram::createKernelsInProgram):
        (WebCore::WebCLProgram::callbackProxy):
        (WebCore::WebCLProgram::build):
        * Modules/webcl/WebCLSampler.cpp:
        (WebCore::WebCLSampler::getInfo):
        * Modules/webcl/WebCLUserEvent.cpp:
        (WebCore::WebCLUserEvent::setUserEventStatus):