GravatarCommit : e6c7d77ead21c088d3168feecd1396b2e2a300a5 [e6c7d77]
Parents: 7cf72d0c76
Auteur : Sharath Kamath <s.kamath@samsung.com>
Date : 7 mars 2014 11:14:19 UTC+1
Commit Date : 11 mars 2014 05:32:39 UTC+1
Labels : HEAD origin/master_r152423 origin/HEAD master_r152423

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

[Part 2] Add validation for pitchValues in equeue*Image API's.

Issue #453

Reviewed by Antonio.

isValidRegionForImage() is used to validate the Image length against region being read
+ offset given bu origin[].
isValidRegionForHostPtr() is used to validate the HostPtr [TypedArrays] against
hostRowPitch {used to move pointer for each row read} region being read.
Does a early error handling, without going down to OpenCL for error handling.

Test cases ::
conformance/bindingTesting/queues/cl_commandQueue_enqueue####Image.html

* Modules/webcl/WebCLCommandQueue.cpp:
(WebCore::WebCLCommandQueue::enqueueReadImageBase):
(WebCore::WebCLCommandQueue::enqueueWriteImageBase):
(WebCore::WebCLCommandQueue::enqueueCopyImage):
(WebCore::WebCLCommandQueue::enqueueCopyImageToBuffer):
(WebCore::WebCLCommandQueue::enqueueCopyBufferToImage):
* Modules/webcl/WebCLInputChecker.cpp:
(WebCore::WebCLInputChecker::isValidRegionForImage):
(WebCore::WebCLInputChecker::isValidRegionForHostPtr):
* Modules/webcl/WebCLInputChecker.h:
Merge branch 'master' of https://github.com/wolfviking0/webcl-webkit