@@ -43,7 +43,7 @@ WebCLCommandQueue::~WebCLCommandQueue()
43
43
ASSERT (!m_clCommandQueue);
44
44
}
45
45
46
- PassRefPtr<WebCLCommandQueue> WebCLCommandQueue::create (cl_command_queue commandQueue, WebCLContext* context, WebCLDevice* device)
46
+ PassRefPtr<WebCLCommandQueue> WebCLCommandQueue::create (cl_command_queue commandQueue, PassRefPtr< WebCLContext> context, WebCLDevice* device)
47
47
{
48
48
return adoptRef (new WebCLCommandQueue (commandQueue, context, device));
49
49
}
@@ -225,7 +225,7 @@ void WebCLCommandQueue::enqueueWriteBufferBase(WebCLBuffer* mem, bool blockingWr
225
225
return ;
226
226
}
227
227
228
- if (!WebCLInputChecker::compareContext (context (), mem->context ())) {
228
+ if (!WebCLInputChecker::compareContext (context (). get () , mem->context (). get ())) {
229
229
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
230
230
return ;
231
231
}
@@ -260,7 +260,7 @@ void WebCLCommandQueue::enqueueWriteBuffer(WebCLBuffer* mem, bool blockingWrite,
260
260
261
261
void WebCLCommandQueue::enqueueWriteBuffer (WebCLBuffer* buffer, bool blockingWrite, unsigned offset, ImageData* srcPixels, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
262
262
{
263
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
263
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
264
264
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
265
265
return ;
266
266
}
@@ -275,7 +275,7 @@ void WebCLCommandQueue::enqueueWriteBuffer(WebCLBuffer* buffer, bool blockingWri
275
275
276
276
void WebCLCommandQueue::enqueueWriteBuffer (WebCLBuffer* buffer, bool blockingWrite, unsigned offset, HTMLCanvasElement* srcCanvas, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
277
277
{
278
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
278
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
279
279
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
280
280
return ;
281
281
}
@@ -291,7 +291,7 @@ void WebCLCommandQueue::enqueueWriteBuffer(WebCLBuffer* buffer, bool blockingWri
291
291
292
292
void WebCLCommandQueue::enqueueWriteBuffer (WebCLBuffer* buffer, bool blockingWrite, unsigned offset, HTMLImageElement* srcImage, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
293
293
{
294
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
294
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
295
295
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
296
296
return ;
297
297
}
@@ -326,7 +326,7 @@ void WebCLCommandQueue::enqueueWriteBufferRectBase(WebCLBuffer* mem, bool blocki
326
326
return ;
327
327
}
328
328
329
- if (!WebCLInputChecker::compareContext (context (), mem->context ())) {
329
+ if (!WebCLInputChecker::compareContext (context (). get () , mem->context (). get ())) {
330
330
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
331
331
return ;
332
332
}
@@ -372,7 +372,7 @@ void WebCLCommandQueue::enqueueWriteBufferRect(WebCLBuffer* mem, bool blockingWr
372
372
373
373
void WebCLCommandQueue::enqueueWriteBufferRect (WebCLBuffer* buffer, bool blockingWrite, const Vector<unsigned >& bufferOrigin, const Vector<unsigned >& hostOrigin, const Vector<unsigned >& region, unsigned bufferRowPitch, unsigned bufferSlicePitch, ImageData* srcPixels, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
374
374
{
375
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
375
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
376
376
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
377
377
return ;
378
378
}
@@ -387,7 +387,7 @@ void WebCLCommandQueue::enqueueWriteBufferRect(WebCLBuffer* buffer, bool blockin
387
387
388
388
void WebCLCommandQueue::enqueueWriteBufferRect (WebCLBuffer* buffer, bool blockingWrite, const Vector<unsigned >& bufferOrigin, const Vector<unsigned >& hostOrigin, const Vector<unsigned >& region, unsigned bufferRowPitch, unsigned bufferSlicePitch, HTMLCanvasElement* srcCanvas, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
389
389
{
390
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
390
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
391
391
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
392
392
return ;
393
393
}
@@ -403,7 +403,7 @@ void WebCLCommandQueue::enqueueWriteBufferRect(WebCLBuffer* buffer, bool blockin
403
403
404
404
void WebCLCommandQueue::enqueueWriteBufferRect (WebCLBuffer* buffer, bool blockingWrite, const Vector<unsigned >& bufferOrigin, const Vector<unsigned >& hostOrigin, const Vector<unsigned >& region, unsigned bufferRowPitch, unsigned bufferSlicePitch, HTMLImageElement* srcImage, const Vector<RefPtr<WebCLEvent>>& eventWaitlist, WebCLEvent* event, ExceptionState& es)
405
405
{
406
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
406
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
407
407
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
408
408
return ;
409
409
}
@@ -424,7 +424,7 @@ void WebCLCommandQueue::enqueueReadBufferBase(WebCLBuffer* mem, bool blockingRea
424
424
return ;
425
425
}
426
426
427
- if (!WebCLInputChecker::compareContext (context (), mem->context ())) {
427
+ if (!WebCLInputChecker::compareContext (context (). get () , mem->context (). get ())) {
428
428
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
429
429
return ;
430
430
}
@@ -469,7 +469,7 @@ void WebCLCommandQueue::enqueueReadBuffer(WebCLBuffer* mem, bool blockingRead, u
469
469
470
470
void WebCLCommandQueue::enqueueReadBuffer (WebCLBuffer* buffer, bool blockingRead, unsigned offset, unsigned numBytes, HTMLCanvasElement* dstCanvas, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
471
471
{
472
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
472
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
473
473
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
474
474
return ;
475
475
}
@@ -490,7 +490,7 @@ void WebCLCommandQueue::enqueueReadBufferRectBase(WebCLBuffer* mem, bool blockin
490
490
return ;
491
491
}
492
492
493
- if (!WebCLInputChecker::compareContext (context (), mem->context ())) {
493
+ if (!WebCLInputChecker::compareContext (context (). get () , mem->context (). get ())) {
494
494
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
495
495
return ;
496
496
}
@@ -550,7 +550,7 @@ void WebCLCommandQueue::enqueueReadBufferRect(WebCLBuffer* mem, bool blockingRea
550
550
551
551
void WebCLCommandQueue::enqueueReadBufferRect (WebCLBuffer* buffer, bool blockingRead, const Vector<unsigned >& bufferOrigin, const Vector<unsigned >& hostOrigin, const Vector<unsigned >& region, unsigned bufferRowPitch, unsigned bufferSlicePitch, HTMLCanvasElement* dstCanvas, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
552
552
{
553
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
553
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
554
554
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
555
555
return ;
556
556
}
@@ -571,7 +571,7 @@ void WebCLCommandQueue::enqueueReadImageBase(WebCLImage* image, bool blockingRea
571
571
return ;
572
572
}
573
573
574
- if (!WebCLInputChecker::compareContext (context (), image->context ())) {
574
+ if (!WebCLInputChecker::compareContext (context (). get () , image->context (). get ())) {
575
575
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
576
576
return ;
577
577
}
@@ -628,7 +628,7 @@ void WebCLCommandQueue::enqueueReadImage(WebCLImage* image, bool blockingRead, c
628
628
629
629
void WebCLCommandQueue::enqueueReadImage (WebCLImage* image, bool blockingRead, const Vector<unsigned >& origin, const Vector<unsigned >& region, HTMLCanvasElement* dstCanvas, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
630
630
{
631
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
631
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
632
632
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
633
633
return ;
634
634
}
@@ -658,7 +658,7 @@ void WebCLCommandQueue::enqueueNDRangeKernel(WebCLKernel* kernel, unsigned dim,
658
658
}
659
659
}
660
660
661
- if (!WebCLInputChecker::compareContext (context (), kernel->context ())) {
661
+ if (!WebCLInputChecker::compareContext (context (). get () , kernel->context (). get ())) {
662
662
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
663
663
return ;
664
664
}
@@ -769,7 +769,7 @@ void WebCLCommandQueue::enqueueWriteImageBase(WebCLImage* image, bool blockingWr
769
769
}
770
770
}
771
771
772
- if (!WebCLInputChecker::compareContext (context (), image->context ())) {
772
+ if (!WebCLInputChecker::compareContext (context (). get () , image->context (). get ())) {
773
773
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
774
774
return ;
775
775
}
@@ -822,7 +822,7 @@ void WebCLCommandQueue::enqueueWriteImage(WebCLImage* image, bool blockingWrite,
822
822
823
823
void WebCLCommandQueue::enqueueWriteImage (WebCLImage* image, bool blockingWrite, const Vector<unsigned >& origin, const Vector<unsigned >& region, ImageData* srcPixels, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
824
824
{
825
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
825
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
826
826
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
827
827
return ;
828
828
}
@@ -837,7 +837,7 @@ void WebCLCommandQueue::enqueueWriteImage(WebCLImage* image, bool blockingWrite,
837
837
838
838
void WebCLCommandQueue::enqueueWriteImage (WebCLImage* image, bool blockingWrite, const Vector<unsigned >& origin, const Vector<unsigned >& region, HTMLCanvasElement* srcCanvas, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
839
839
{
840
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
840
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
841
841
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
842
842
return ;
843
843
}
@@ -853,7 +853,7 @@ void WebCLCommandQueue::enqueueWriteImage(WebCLImage* image, bool blockingWrite,
853
853
854
854
void WebCLCommandQueue::enqueueWriteImage (WebCLImage* image, bool blockingWrite, const Vector<unsigned >& origin, const Vector<unsigned >& region, HTMLImageElement* srcImage, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
855
855
{
856
- if (!isExtensionEnabled (context (), " WEBCL_html_image" )) {
856
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_image" )) {
857
857
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
858
858
return ;
859
859
}
@@ -869,7 +869,7 @@ void WebCLCommandQueue::enqueueWriteImage(WebCLImage* image, bool blockingWrite,
869
869
870
870
void WebCLCommandQueue::enqueueWriteImage (WebCLImage* image, bool blockingWrite, HTMLVideoElement* srcVideo, const Vector<RefPtr<WebCLEvent>>& events, WebCLEvent* event, ExceptionState& es)
871
871
{
872
- if (!isExtensionEnabled (context (), " WEBCL_html_video" )) {
872
+ if (!isExtensionEnabled (context (). get () , " WEBCL_html_video" )) {
873
873
es.throwWebCLException (WebCLException::EXTENSION_NOT_ENABLED, WebCLException::extensionNotEnabledMessage);
874
874
return ;
875
875
}
@@ -918,7 +918,7 @@ void WebCLCommandQueue::enqueueCopyBuffer(WebCLBuffer* srcBuffer, WebCLBuffer* d
918
918
}
919
919
}
920
920
921
- if (!WebCLInputChecker::compareContext (context (), srcBuffer->context ()) || !WebCLInputChecker::compareContext (context (), dstBuffer->context ())) {
921
+ if (!WebCLInputChecker::compareContext (context (). get () , srcBuffer->context (). get ()) || !WebCLInputChecker::compareContext (context (). get () , dstBuffer->context (). get ())) {
922
922
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
923
923
return ;
924
924
}
@@ -973,7 +973,7 @@ void WebCLCommandQueue::enqueueCopyBufferRect(WebCLBuffer* srcBuffer, WebCLBuffe
973
973
}
974
974
}
975
975
976
- if (!WebCLInputChecker::compareContext (context (), srcBuffer->context ()) || !WebCLInputChecker::compareContext (context (), dstBuffer->context ())) {
976
+ if (!WebCLInputChecker::compareContext (context (). get () , srcBuffer->context (). get ()) || !WebCLInputChecker::compareContext (context (). get () , dstBuffer->context (). get ())) {
977
977
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
978
978
return ;
979
979
}
@@ -1040,7 +1040,7 @@ void WebCLCommandQueue::enqueueCopyImage(WebCLImage* srcImage, WebCLImage* dstIm
1040
1040
}
1041
1041
}
1042
1042
1043
- if (!WebCLInputChecker::compareContext (context (), srcImage->context ()) || !WebCLInputChecker::compareContext (context (), dstImage->context ())) {
1043
+ if (!WebCLInputChecker::compareContext (context (). get () , srcImage->context (). get ()) || !WebCLInputChecker::compareContext (context (). get () , dstImage->context (). get ())) {
1044
1044
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
1045
1045
return ;
1046
1046
}
@@ -1109,7 +1109,7 @@ void WebCLCommandQueue::enqueueCopyImageToBuffer(WebCLImage* srcImage, WebCLBuff
1109
1109
}
1110
1110
}
1111
1111
1112
- if (!WebCLInputChecker::compareContext (context (), srcImage->context ()) || !WebCLInputChecker::compareContext (context (), dstBuffer->context ())) {
1112
+ if (!WebCLInputChecker::compareContext (context (). get () , srcImage->context (). get ()) || !WebCLInputChecker::compareContext (context (). get () , dstBuffer->context (). get ())) {
1113
1113
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
1114
1114
return ;
1115
1115
}
@@ -1169,7 +1169,7 @@ void WebCLCommandQueue::enqueueCopyBufferToImage(WebCLBuffer* srcBuffer, WebCLIm
1169
1169
}
1170
1170
}
1171
1171
1172
- if (!WebCLInputChecker::compareContext (context (), srcBuffer->context ()) || !WebCLInputChecker::compareContext (context (), dstImage->context ())) {
1172
+ if (!WebCLInputChecker::compareContext (context (). get () , srcBuffer->context (). get ()) || !WebCLInputChecker::compareContext (context (). get () , dstImage->context (). get ())) {
1173
1173
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
1174
1174
return ;
1175
1175
}
@@ -1205,7 +1205,7 @@ void WebCLCommandQueue::enqueueCopyBufferToImage(WebCLBuffer* srcBuffer, WebCLIm
1205
1205
WebCLException::throwException (err, es);
1206
1206
}
1207
1207
1208
- WebCLCommandQueue::WebCLCommandQueue (cl_command_queue commandQueue, WebCLContext* context, WebCLDevice* device)
1208
+ WebCLCommandQueue::WebCLCommandQueue (cl_command_queue commandQueue, PassRefPtr< WebCLContext> context, WebCLDevice* device)
1209
1209
: WebCLObject(context)
1210
1210
, m_whenFinishCallback(nullptr )
1211
1211
, m_eventForCallback(0 )
@@ -1222,7 +1222,7 @@ Vector<cl_event> WebCLCommandQueue::WebCLEventVectorToCLEventVector(bool blockin
1222
1222
es.throwWebCLException (WebCLException::INVALID_EVENT_WAIT_LIST, WebCLException::invalidEventWaitListMessage);
1223
1223
break ;
1224
1224
}
1225
- if (!WebCLInputChecker::compareContext (context (), event->context ())) {
1225
+ if (!WebCLInputChecker::compareContext (context (). get () , event->context (). get ())) {
1226
1226
es.throwWebCLException (WebCLException::INVALID_CONTEXT, WebCLException::invalidContextMessage);
1227
1227
break ;
1228
1228
}
0 commit comments