2014-03-18  Sharath Kamath  <s.kamath@samsung.com>

         KHR_GL_Sharing API's test cases crash.

         Issue #477

         Reviewed by Antonio

         The crash are due to the test cases testing for INVALID_CONTEXT.
         Added check to avoid calling OpenCL cl-gl API's on WebCL context
         that are not created with WebGLContext sharing.

         Also added getGLContext() API support.

         All test cases under extension KHR_GL_Sharing in test suite.

        * Modules/webcl/WebCLCommandQueue.cpp:
        (WebCore::WebCLCommandQueue::isExtensionEnabled):
        (WebCore::WebCLCommandQueue::enqueueAcquireGLObjects):
        (WebCore::WebCLCommandQueue::enqueueReleaseGLObjects):
        * Modules/webcl/WebCLContext.cpp:
        (WebCore::WebCLContext::create):
        (WebCore::WebCLContext::WebCLContext):
        (WebCore::WebCLContext::getGLContext):
        (WebCore::WebCLContext::isGLCapableContext):
        (WebCore::WebCLContext::createFromGLBuffer):
        (WebCore::WebCLContext::createFromGLRenderbuffer):
        (WebCore::WebCLContext::createFromGLTexture):
        * Modules/webcl/WebCLContext.h:
        * Modules/webcl/WebCLContext.idl: