| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/webgl/WebGL2RenderingContextBase.h" | 5 #include "modules/webgl/WebGL2RenderingContextBase.h" |
| 6 | 6 |
| 7 #include "bindings/modules/v8/WebGLAny.h" | 7 #include "bindings/modules/v8/WebGLAny.h" |
| 8 #include "core/frame/ImageBitmap.h" | 8 #include "core/frame/ImageBitmap.h" |
| 9 #include "core/html/HTMLCanvasElement.h" | 9 #include "core/html/HTMLCanvasElement.h" |
| 10 #include "core/html/HTMLImageElement.h" | 10 #include "core/html/HTMLImageElement.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 m_packSkipRows = 0; | 241 m_packSkipRows = 0; |
| 242 m_unpackRowLength = 0; | 242 m_unpackRowLength = 0; |
| 243 m_unpackImageHeight = 0; | 243 m_unpackImageHeight = 0; |
| 244 m_unpackSkipPixels = 0; | 244 m_unpackSkipPixels = 0; |
| 245 m_unpackSkipRows = 0; | 245 m_unpackSkipRows = 0; |
| 246 m_unpackSkipImages = 0; | 246 m_unpackSkipImages = 0; |
| 247 | 247 |
| 248 WebGLRenderingContextBase::initializeNewContext(); | 248 WebGLRenderingContextBase::initializeNewContext(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void WebGL2RenderingContextBase::bufferData(GLenum target, | 251 void WebGL2RenderingContextBase::bufferData( |
| 252 DOMArrayBufferView* srcData, | 252 GLenum target, |
| 253 GLenum usage, | 253 const NotShared<DOMArrayBufferView>& srcData, |
| 254 GLuint srcOffset, | 254 GLenum usage, |
| 255 GLuint length) { | 255 GLuint srcOffset, |
| 256 GLuint length) { |
| 256 if (isContextLost()) | 257 if (isContextLost()) |
| 257 return; | 258 return; |
| 258 void* subBaseAddress = nullptr; | 259 void* subBaseAddress = nullptr; |
| 259 long long subByteLength = 0; | 260 long long subByteLength = 0; |
| 260 if (!validateSubSourceAndGetData(srcData, srcOffset, length, &subBaseAddress, | 261 if (!validateSubSourceAndGetData(srcData.view(), srcOffset, length, |
| 261 &subByteLength)) { | 262 &subBaseAddress, &subByteLength)) { |
| 262 synthesizeGLError(GL_INVALID_VALUE, "bufferData", | 263 synthesizeGLError(GL_INVALID_VALUE, "bufferData", |
| 263 "srcOffset + length too large"); | 264 "srcOffset + length too large"); |
| 264 return; | 265 return; |
| 265 } | 266 } |
| 266 bufferDataImpl(target, subByteLength, subBaseAddress, usage); | 267 bufferDataImpl(target, subByteLength, subBaseAddress, usage); |
| 267 } | 268 } |
| 268 | 269 |
| 269 void WebGL2RenderingContextBase::bufferData(GLenum target, | 270 void WebGL2RenderingContextBase::bufferData(GLenum target, |
| 270 long long size, | 271 long long size, |
| 271 GLenum usage) { | 272 GLenum usage) { |
| 272 WebGLRenderingContextBase::bufferData(target, size, usage); | 273 WebGLRenderingContextBase::bufferData(target, size, usage); |
| 273 } | 274 } |
| 274 | 275 |
| 275 void WebGL2RenderingContextBase::bufferData(GLenum target, | 276 void WebGL2RenderingContextBase::bufferData(GLenum target, |
| 276 DOMArrayBuffer* data, | 277 DOMArrayBuffer* data, |
| 277 GLenum usage) { | 278 GLenum usage) { |
| 278 WebGLRenderingContextBase::bufferData(target, data, usage); | 279 WebGLRenderingContextBase::bufferData(target, data, usage); |
| 279 } | 280 } |
| 280 | 281 |
| 281 void WebGL2RenderingContextBase::bufferData(GLenum target, | 282 void WebGL2RenderingContextBase::bufferData( |
| 282 DOMArrayBufferView* data, | 283 GLenum target, |
| 283 GLenum usage) { | 284 const NotShared<DOMArrayBufferView>& data, |
| 285 GLenum usage) { |
| 284 WebGLRenderingContextBase::bufferData(target, data, usage); | 286 WebGLRenderingContextBase::bufferData(target, data, usage); |
| 285 } | 287 } |
| 286 | 288 |
| 287 void WebGL2RenderingContextBase::bufferSubData(GLenum target, | 289 void WebGL2RenderingContextBase::bufferSubData( |
| 288 GLintptr dstByteOffset, | 290 GLenum target, |
| 289 DOMArrayBufferView* srcData, | 291 GLintptr dstByteOffset, |
| 290 GLuint srcOffset, | 292 const NotShared<DOMArrayBufferView>& srcData, |
| 291 GLuint length) { | 293 GLuint srcOffset, |
| 294 GLuint length) { |
| 292 if (isContextLost()) | 295 if (isContextLost()) |
| 293 return; | 296 return; |
| 294 void* subBaseAddress = nullptr; | 297 void* subBaseAddress = nullptr; |
| 295 long long subByteLength = 0; | 298 long long subByteLength = 0; |
| 296 if (!validateSubSourceAndGetData(srcData, srcOffset, length, &subBaseAddress, | 299 if (!validateSubSourceAndGetData(srcData.view(), srcOffset, length, |
| 297 &subByteLength)) { | 300 &subBaseAddress, &subByteLength)) { |
| 298 synthesizeGLError(GL_INVALID_VALUE, "bufferSubData", | 301 synthesizeGLError(GL_INVALID_VALUE, "bufferSubData", |
| 299 "srcOffset + length too large"); | 302 "srcOffset + length too large"); |
| 300 return; | 303 return; |
| 301 } | 304 } |
| 302 bufferSubDataImpl(target, dstByteOffset, subByteLength, subBaseAddress); | 305 bufferSubDataImpl(target, dstByteOffset, subByteLength, subBaseAddress); |
| 303 } | 306 } |
| 304 | 307 |
| 305 void WebGL2RenderingContextBase::bufferSubData(GLenum target, | 308 void WebGL2RenderingContextBase::bufferSubData(GLenum target, |
| 306 long long offset, | 309 long long offset, |
| 307 DOMArrayBuffer* data) { | 310 DOMArrayBuffer* data) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 } | 361 } |
| 359 | 362 |
| 360 if (writeBuffer->getInitialTarget() == 0) | 363 if (writeBuffer->getInitialTarget() == 0) |
| 361 writeBuffer->setInitialTarget(readBuffer->getInitialTarget()); | 364 writeBuffer->setInitialTarget(readBuffer->getInitialTarget()); |
| 362 | 365 |
| 363 contextGL()->CopyBufferSubData( | 366 contextGL()->CopyBufferSubData( |
| 364 readTarget, writeTarget, static_cast<GLintptr>(readOffset), | 367 readTarget, writeTarget, static_cast<GLintptr>(readOffset), |
| 365 static_cast<GLintptr>(writeOffset), static_cast<GLsizeiptr>(size)); | 368 static_cast<GLintptr>(writeOffset), static_cast<GLsizeiptr>(size)); |
| 366 } | 369 } |
| 367 | 370 |
| 368 void WebGL2RenderingContextBase::getBufferSubData(GLenum target, | 371 void WebGL2RenderingContextBase::getBufferSubData( |
| 369 long long srcByteOffset, | 372 GLenum target, |
| 370 DOMArrayBufferView* dstData, | 373 long long srcByteOffset, |
| 371 GLuint dstOffset, | 374 const NotShared<DOMArrayBufferView>& dstData, |
| 372 GLuint length) { | 375 GLuint dstOffset, |
| 376 GLuint length) { |
| 373 WebGLBuffer* sourceBuffer = nullptr; | 377 WebGLBuffer* sourceBuffer = nullptr; |
| 374 void* destinationDataPtr = nullptr; | 378 void* destinationDataPtr = nullptr; |
| 375 long long destinationByteLength = 0; | 379 long long destinationByteLength = 0; |
| 376 const char* message = validateGetBufferSubData( | 380 const char* message = validateGetBufferSubData( |
| 377 __FUNCTION__, target, srcByteOffset, dstData, dstOffset, length, | 381 __FUNCTION__, target, srcByteOffset, dstData.view(), dstOffset, length, |
| 378 &sourceBuffer, &destinationDataPtr, &destinationByteLength); | 382 &sourceBuffer, &destinationDataPtr, &destinationByteLength); |
| 379 if (message) { | 383 if (message) { |
| 380 // If there was a GL error, it was already synthesized in | 384 // If there was a GL error, it was already synthesized in |
| 381 // validateGetBufferSubData, so it's not done here. | 385 // validateGetBufferSubData, so it's not done here. |
| 382 return; | 386 return; |
| 383 } | 387 } |
| 384 | 388 |
| 385 // If the length of the copy is zero, this is a no-op. | 389 // If the length of the copy is zero, this is a no-op. |
| 386 if (!destinationByteLength) { | 390 if (!destinationByteLength) { |
| 387 return; | 391 return; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 case GL_UNPACK_SKIP_IMAGES: | 762 case GL_UNPACK_SKIP_IMAGES: |
| 759 m_unpackSkipImages = param; | 763 m_unpackSkipImages = param; |
| 760 break; | 764 break; |
| 761 default: | 765 default: |
| 762 WebGLRenderingContextBase::pixelStorei(pname, param); | 766 WebGLRenderingContextBase::pixelStorei(pname, param); |
| 763 return; | 767 return; |
| 764 } | 768 } |
| 765 contextGL()->PixelStorei(pname, param); | 769 contextGL()->PixelStorei(pname, param); |
| 766 } | 770 } |
| 767 | 771 |
| 768 void WebGL2RenderingContextBase::readPixels(GLint x, | 772 void WebGL2RenderingContextBase::readPixels( |
| 769 GLint y, | 773 GLint x, |
| 770 GLsizei width, | 774 GLint y, |
| 771 GLsizei height, | 775 GLsizei width, |
| 772 GLenum format, | 776 GLsizei height, |
| 773 GLenum type, | 777 GLenum format, |
| 774 DOMArrayBufferView* pixels) { | 778 GLenum type, |
| 779 const NotShared<DOMArrayBufferView>& pixels) { |
| 775 if (isContextLost()) | 780 if (isContextLost()) |
| 776 return; | 781 return; |
| 777 if (m_boundPixelPackBuffer.get()) { | 782 if (m_boundPixelPackBuffer.get()) { |
| 778 synthesizeGLError(GL_INVALID_OPERATION, "readPixels", | 783 synthesizeGLError(GL_INVALID_OPERATION, "readPixels", |
| 779 "PIXEL_PACK buffer should not be bound"); | 784 "PIXEL_PACK buffer should not be bound"); |
| 780 return; | 785 return; |
| 781 } | 786 } |
| 782 | 787 |
| 783 readPixelsHelper(x, y, width, height, format, type, pixels, 0); | 788 readPixelsHelper(x, y, width, height, format, type, pixels.view(), 0); |
| 784 } | 789 } |
| 785 | 790 |
| 786 void WebGL2RenderingContextBase::readPixels(GLint x, | 791 void WebGL2RenderingContextBase::readPixels( |
| 787 GLint y, | 792 GLint x, |
| 788 GLsizei width, | 793 GLint y, |
| 789 GLsizei height, | 794 GLsizei width, |
| 790 GLenum format, | 795 GLsizei height, |
| 791 GLenum type, | 796 GLenum format, |
| 792 DOMArrayBufferView* pixels, | 797 GLenum type, |
| 793 GLuint offset) { | 798 const NotShared<DOMArrayBufferView>& pixels, |
| 799 GLuint offset) { |
| 794 if (isContextLost()) | 800 if (isContextLost()) |
| 795 return; | 801 return; |
| 796 if (m_boundPixelPackBuffer.get()) { | 802 if (m_boundPixelPackBuffer.get()) { |
| 797 synthesizeGLError(GL_INVALID_OPERATION, "readPixels", | 803 synthesizeGLError(GL_INVALID_OPERATION, "readPixels", |
| 798 "PIXEL_PACK buffer should not be bound"); | 804 "PIXEL_PACK buffer should not be bound"); |
| 799 return; | 805 return; |
| 800 } | 806 } |
| 801 | 807 |
| 802 readPixelsHelper(x, y, width, height, format, type, pixels, offset); | 808 readPixelsHelper(x, y, width, height, format, type, pixels.view(), offset); |
| 803 } | 809 } |
| 804 | 810 |
| 805 void WebGL2RenderingContextBase::readPixels(GLint x, | 811 void WebGL2RenderingContextBase::readPixels(GLint x, |
| 806 GLint y, | 812 GLint y, |
| 807 GLsizei width, | 813 GLsizei width, |
| 808 GLsizei height, | 814 GLsizei height, |
| 809 GLenum format, | 815 GLenum format, |
| 810 GLenum type, | 816 GLenum type, |
| 811 long long offset) { | 817 long long offset) { |
| 812 if (isContextLost()) | 818 if (isContextLost()) |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 yoffset, 0)) | 1141 yoffset, 0)) |
| 1136 return; | 1142 return; |
| 1137 if (!validateValueFitNonNegInt32("texSubImage2D", "offset", offset)) | 1143 if (!validateValueFitNonNegInt32("texSubImage2D", "offset", offset)) |
| 1138 return; | 1144 return; |
| 1139 | 1145 |
| 1140 contextGL()->TexSubImage2D(target, level, xoffset, yoffset, width, height, | 1146 contextGL()->TexSubImage2D(target, level, xoffset, yoffset, width, height, |
| 1141 format, type, | 1147 format, type, |
| 1142 reinterpret_cast<const void*>(offset)); | 1148 reinterpret_cast<const void*>(offset)); |
| 1143 } | 1149 } |
| 1144 | 1150 |
| 1145 void WebGL2RenderingContextBase::texImage2D(GLenum target, | 1151 void WebGL2RenderingContextBase::texImage2D( |
| 1146 GLint level, | 1152 GLenum target, |
| 1147 GLint internalformat, | 1153 GLint level, |
| 1148 GLsizei width, | 1154 GLint internalformat, |
| 1149 GLsizei height, | 1155 GLsizei width, |
| 1150 GLint border, | 1156 GLsizei height, |
| 1151 GLenum format, | 1157 GLint border, |
| 1152 GLenum type, | 1158 GLenum format, |
| 1153 DOMArrayBufferView* data) { | 1159 GLenum type, |
| 1160 const NotShared<DOMArrayBufferView>& data) { |
| 1154 if (isContextLost()) | 1161 if (isContextLost()) |
| 1155 return; | 1162 return; |
| 1156 if (m_boundPixelUnpackBuffer) { | 1163 if (m_boundPixelUnpackBuffer) { |
| 1157 synthesizeGLError(GL_INVALID_OPERATION, "texImage2D", | 1164 synthesizeGLError(GL_INVALID_OPERATION, "texImage2D", |
| 1158 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1165 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1159 return; | 1166 return; |
| 1160 } | 1167 } |
| 1161 WebGLRenderingContextBase::texImage2D(target, level, internalformat, width, | 1168 WebGLRenderingContextBase::texImage2D(target, level, internalformat, width, |
| 1162 height, border, format, type, data); | 1169 height, border, format, type, data); |
| 1163 } | 1170 } |
| 1164 | 1171 |
| 1165 void WebGL2RenderingContextBase::texImage2D(GLenum target, | 1172 void WebGL2RenderingContextBase::texImage2D( |
| 1166 GLint level, | 1173 GLenum target, |
| 1167 GLint internalformat, | 1174 GLint level, |
| 1168 GLsizei width, | 1175 GLint internalformat, |
| 1169 GLsizei height, | 1176 GLsizei width, |
| 1170 GLint border, | 1177 GLsizei height, |
| 1171 GLenum format, | 1178 GLint border, |
| 1172 GLenum type, | 1179 GLenum format, |
| 1173 DOMArrayBufferView* data, | 1180 GLenum type, |
| 1174 GLuint srcOffset) { | 1181 const NotShared<DOMArrayBufferView>& data, |
| 1182 GLuint srcOffset) { |
| 1175 if (isContextLost()) | 1183 if (isContextLost()) |
| 1176 return; | 1184 return; |
| 1177 if (m_boundPixelUnpackBuffer) { | 1185 if (m_boundPixelUnpackBuffer) { |
| 1178 synthesizeGLError(GL_INVALID_OPERATION, "texImage2D", | 1186 synthesizeGLError(GL_INVALID_OPERATION, "texImage2D", |
| 1179 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1187 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1180 return; | 1188 return; |
| 1181 } | 1189 } |
| 1182 texImageHelperDOMArrayBufferView(TexImage2D, target, level, internalformat, | 1190 texImageHelperDOMArrayBufferView(TexImage2D, target, level, internalformat, |
| 1183 width, height, 1, border, format, type, 0, 0, | 1191 width, height, 1, border, format, type, 0, 0, |
| 1184 0, data, NullNotReachable, srcOffset); | 1192 0, data.view(), NullNotReachable, srcOffset); |
| 1185 } | 1193 } |
| 1186 | 1194 |
| 1187 void WebGL2RenderingContextBase::texImage2D(GLenum target, | 1195 void WebGL2RenderingContextBase::texImage2D(GLenum target, |
| 1188 GLint level, | 1196 GLint level, |
| 1189 GLint internalformat, | 1197 GLint internalformat, |
| 1190 GLsizei width, | 1198 GLsizei width, |
| 1191 GLsizei height, | 1199 GLsizei height, |
| 1192 GLint border, | 1200 GLint border, |
| 1193 GLenum format, | 1201 GLenum format, |
| 1194 GLenum type, | 1202 GLenum type, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 return; | 1386 return; |
| 1379 if (m_boundPixelUnpackBuffer) { | 1387 if (m_boundPixelUnpackBuffer) { |
| 1380 synthesizeGLError(GL_INVALID_OPERATION, "texImage2D", | 1388 synthesizeGLError(GL_INVALID_OPERATION, "texImage2D", |
| 1381 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1389 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1382 return; | 1390 return; |
| 1383 } | 1391 } |
| 1384 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, | 1392 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, |
| 1385 type, imageBitMap, exceptionState); | 1393 type, imageBitMap, exceptionState); |
| 1386 } | 1394 } |
| 1387 | 1395 |
| 1388 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, | 1396 void WebGL2RenderingContextBase::texSubImage2D( |
| 1389 GLint level, | 1397 GLenum target, |
| 1390 GLint xoffset, | 1398 GLint level, |
| 1391 GLint yoffset, | 1399 GLint xoffset, |
| 1392 GLsizei width, | 1400 GLint yoffset, |
| 1393 GLsizei height, | 1401 GLsizei width, |
| 1394 GLenum format, | 1402 GLsizei height, |
| 1395 GLenum type, | 1403 GLenum format, |
| 1396 DOMArrayBufferView* pixels) { | 1404 GLenum type, |
| 1405 const NotShared<DOMArrayBufferView>& pixels) { |
| 1397 if (isContextLost()) | 1406 if (isContextLost()) |
| 1398 return; | 1407 return; |
| 1399 if (m_boundPixelUnpackBuffer) { | 1408 if (m_boundPixelUnpackBuffer) { |
| 1400 synthesizeGLError(GL_INVALID_OPERATION, "texSubImage2D", | 1409 synthesizeGLError(GL_INVALID_OPERATION, "texSubImage2D", |
| 1401 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1410 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1402 return; | 1411 return; |
| 1403 } | 1412 } |
| 1404 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, | 1413 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, |
| 1405 width, height, format, type, pixels); | 1414 width, height, format, type, pixels); |
| 1406 } | 1415 } |
| 1407 | 1416 |
| 1408 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, | 1417 void WebGL2RenderingContextBase::texSubImage2D( |
| 1409 GLint level, | 1418 GLenum target, |
| 1410 GLint xoffset, | 1419 GLint level, |
| 1411 GLint yoffset, | 1420 GLint xoffset, |
| 1412 GLsizei width, | 1421 GLint yoffset, |
| 1413 GLsizei height, | 1422 GLsizei width, |
| 1414 GLenum format, | 1423 GLsizei height, |
| 1415 GLenum type, | 1424 GLenum format, |
| 1416 DOMArrayBufferView* pixels, | 1425 GLenum type, |
| 1417 GLuint srcOffset) { | 1426 const NotShared<DOMArrayBufferView>& pixels, |
| 1427 GLuint srcOffset) { |
| 1418 if (isContextLost()) | 1428 if (isContextLost()) |
| 1419 return; | 1429 return; |
| 1420 if (m_boundPixelUnpackBuffer) { | 1430 if (m_boundPixelUnpackBuffer) { |
| 1421 synthesizeGLError(GL_INVALID_OPERATION, "texSubImage2D", | 1431 synthesizeGLError(GL_INVALID_OPERATION, "texSubImage2D", |
| 1422 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1432 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1423 return; | 1433 return; |
| 1424 } | 1434 } |
| 1425 texImageHelperDOMArrayBufferView(TexSubImage2D, target, level, 0, width, | 1435 texImageHelperDOMArrayBufferView( |
| 1426 height, 1, 0, format, type, xoffset, yoffset, | 1436 TexSubImage2D, target, level, 0, width, height, 1, 0, format, type, |
| 1427 0, pixels, NullNotReachable, srcOffset); | 1437 xoffset, yoffset, 0, pixels.view(), NullNotReachable, srcOffset); |
| 1428 } | 1438 } |
| 1429 | 1439 |
| 1430 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, | 1440 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, |
| 1431 GLint level, | 1441 GLint level, |
| 1432 GLint xoffset, | 1442 GLint xoffset, |
| 1433 GLint yoffset, | 1443 GLint yoffset, |
| 1434 GLsizei width, | 1444 GLsizei width, |
| 1435 GLsizei height, | 1445 GLsizei height, |
| 1436 GLenum format, | 1446 GLenum format, |
| 1437 GLenum type, | 1447 GLenum type, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 GLsizei depth) { | 1658 GLsizei depth) { |
| 1649 if (isContextLost() || | 1659 if (isContextLost() || |
| 1650 !validateTexStorage("texStorage3D", target, levels, internalformat, width, | 1660 !validateTexStorage("texStorage3D", target, levels, internalformat, width, |
| 1651 height, depth, TexStorageType3D)) | 1661 height, depth, TexStorageType3D)) |
| 1652 return; | 1662 return; |
| 1653 | 1663 |
| 1654 contextGL()->TexStorage3D(target, levels, internalformat, width, height, | 1664 contextGL()->TexStorage3D(target, levels, internalformat, width, height, |
| 1655 depth); | 1665 depth); |
| 1656 } | 1666 } |
| 1657 | 1667 |
| 1658 void WebGL2RenderingContextBase::texImage3D(GLenum target, | 1668 void WebGL2RenderingContextBase::texImage3D( |
| 1659 GLint level, | 1669 GLenum target, |
| 1660 GLint internalformat, | 1670 GLint level, |
| 1661 GLsizei width, | 1671 GLint internalformat, |
| 1662 GLsizei height, | 1672 GLsizei width, |
| 1663 GLsizei depth, | 1673 GLsizei height, |
| 1664 GLint border, | 1674 GLsizei depth, |
| 1665 GLenum format, | 1675 GLint border, |
| 1666 GLenum type, | 1676 GLenum format, |
| 1667 DOMArrayBufferView* pixels) { | 1677 GLenum type, |
| 1678 const NotShared<DOMArrayBufferView>& pixels) { |
| 1668 texImageHelperDOMArrayBufferView(TexImage3D, target, level, internalformat, | 1679 texImageHelperDOMArrayBufferView(TexImage3D, target, level, internalformat, |
| 1669 width, height, depth, border, format, type, | 1680 width, height, depth, border, format, type, |
| 1670 0, 0, 0, pixels, NullAllowed, 0); | 1681 0, 0, 0, pixels.view(), NullAllowed, 0); |
| 1671 } | 1682 } |
| 1672 | 1683 |
| 1673 void WebGL2RenderingContextBase::texImage3D(GLenum target, | 1684 void WebGL2RenderingContextBase::texImage3D( |
| 1674 GLint level, | 1685 GLenum target, |
| 1675 GLint internalformat, | 1686 GLint level, |
| 1676 GLsizei width, | 1687 GLint internalformat, |
| 1677 GLsizei height, | 1688 GLsizei width, |
| 1678 GLsizei depth, | 1689 GLsizei height, |
| 1679 GLint border, | 1690 GLsizei depth, |
| 1680 GLenum format, | 1691 GLint border, |
| 1681 GLenum type, | 1692 GLenum format, |
| 1682 DOMArrayBufferView* pixels, | 1693 GLenum type, |
| 1683 GLuint srcOffset) { | 1694 const NotShared<DOMArrayBufferView>& pixels, |
| 1695 GLuint srcOffset) { |
| 1684 if (isContextLost()) | 1696 if (isContextLost()) |
| 1685 return; | 1697 return; |
| 1686 if (m_boundPixelUnpackBuffer) { | 1698 if (m_boundPixelUnpackBuffer) { |
| 1687 synthesizeGLError(GL_INVALID_OPERATION, "texImage3D", | 1699 synthesizeGLError(GL_INVALID_OPERATION, "texImage3D", |
| 1688 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1700 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1689 return; | 1701 return; |
| 1690 } | 1702 } |
| 1691 texImageHelperDOMArrayBufferView( | 1703 texImageHelperDOMArrayBufferView( |
| 1692 TexImage3D, target, level, internalformat, width, height, depth, border, | 1704 TexImage3D, target, level, internalformat, width, height, depth, border, |
| 1693 format, type, 0, 0, 0, pixels, NullNotReachable, srcOffset); | 1705 format, type, 0, 0, 0, pixels.view(), NullNotReachable, srcOffset); |
| 1694 } | 1706 } |
| 1695 | 1707 |
| 1696 void WebGL2RenderingContextBase::texImage3D(GLenum target, | 1708 void WebGL2RenderingContextBase::texImage3D(GLenum target, |
| 1697 GLint level, | 1709 GLint level, |
| 1698 GLint internalformat, | 1710 GLint internalformat, |
| 1699 GLsizei width, | 1711 GLsizei width, |
| 1700 GLsizei height, | 1712 GLsizei height, |
| 1701 GLsizei depth, | 1713 GLsizei depth, |
| 1702 GLint border, | 1714 GLint border, |
| 1703 GLenum format, | 1715 GLenum format, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1833 synthesizeGLError(GL_INVALID_OPERATION, "texImage3D", | 1845 synthesizeGLError(GL_INVALID_OPERATION, "texImage3D", |
| 1834 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1846 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1835 return; | 1847 return; |
| 1836 } | 1848 } |
| 1837 texImageHelperImageBitmap(TexImage3D, target, level, internalformat, format, | 1849 texImageHelperImageBitmap(TexImage3D, target, level, internalformat, format, |
| 1838 type, 0, 0, 0, bitmap, | 1850 type, 0, 0, 0, bitmap, |
| 1839 getTextureSourceSubRectangle(width, height), depth, | 1851 getTextureSourceSubRectangle(width, height), depth, |
| 1840 m_unpackImageHeight, exceptionState); | 1852 m_unpackImageHeight, exceptionState); |
| 1841 } | 1853 } |
| 1842 | 1854 |
| 1843 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, | 1855 void WebGL2RenderingContextBase::texSubImage3D( |
| 1844 GLint level, | 1856 GLenum target, |
| 1845 GLint xoffset, | 1857 GLint level, |
| 1846 GLint yoffset, | 1858 GLint xoffset, |
| 1847 GLint zoffset, | 1859 GLint yoffset, |
| 1848 GLsizei width, | 1860 GLint zoffset, |
| 1849 GLsizei height, | 1861 GLsizei width, |
| 1850 GLsizei depth, | 1862 GLsizei height, |
| 1851 GLenum format, | 1863 GLsizei depth, |
| 1852 GLenum type, | 1864 GLenum format, |
| 1853 DOMArrayBufferView* pixels, | 1865 GLenum type, |
| 1854 GLuint srcOffset) { | 1866 const NotShared<DOMArrayBufferView>& pixels, |
| 1867 GLuint srcOffset) { |
| 1855 if (isContextLost()) | 1868 if (isContextLost()) |
| 1856 return; | 1869 return; |
| 1857 if (m_boundPixelUnpackBuffer) { | 1870 if (m_boundPixelUnpackBuffer) { |
| 1858 synthesizeGLError(GL_INVALID_OPERATION, "texSubImage3D", | 1871 synthesizeGLError(GL_INVALID_OPERATION, "texSubImage3D", |
| 1859 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 1872 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 1860 return; | 1873 return; |
| 1861 } | 1874 } |
| 1862 texImageHelperDOMArrayBufferView( | 1875 texImageHelperDOMArrayBufferView( |
| 1863 TexSubImage3D, target, level, 0, width, height, depth, 0, format, type, | 1876 TexSubImage3D, target, level, 0, width, height, depth, 0, format, type, |
| 1864 xoffset, yoffset, zoffset, pixels, NullNotReachable, srcOffset); | 1877 xoffset, yoffset, zoffset, pixels.view(), NullNotReachable, srcOffset); |
| 1865 } | 1878 } |
| 1866 | 1879 |
| 1867 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, | 1880 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, |
| 1868 GLint level, | 1881 GLint level, |
| 1869 GLint xoffset, | 1882 GLint xoffset, |
| 1870 GLint yoffset, | 1883 GLint yoffset, |
| 1871 GLint zoffset, | 1884 GLint zoffset, |
| 1872 GLsizei width, | 1885 GLsizei width, |
| 1873 GLsizei height, | 1886 GLsizei height, |
| 1874 GLsizei depth, | 1887 GLsizei depth, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2044 width, height); | 2057 width, height); |
| 2045 } | 2058 } |
| 2046 | 2059 |
| 2047 void WebGL2RenderingContextBase::compressedTexImage2D( | 2060 void WebGL2RenderingContextBase::compressedTexImage2D( |
| 2048 GLenum target, | 2061 GLenum target, |
| 2049 GLint level, | 2062 GLint level, |
| 2050 GLenum internalformat, | 2063 GLenum internalformat, |
| 2051 GLsizei width, | 2064 GLsizei width, |
| 2052 GLsizei height, | 2065 GLsizei height, |
| 2053 GLint border, | 2066 GLint border, |
| 2054 DOMArrayBufferView* data) { | 2067 const NotShared<DOMArrayBufferView>& data) { |
| 2055 if (isContextLost()) | 2068 if (isContextLost()) |
| 2056 return; | 2069 return; |
| 2057 if (m_boundPixelUnpackBuffer) { | 2070 if (m_boundPixelUnpackBuffer) { |
| 2058 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage2D", | 2071 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage2D", |
| 2059 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 2072 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 2060 return; | 2073 return; |
| 2061 } | 2074 } |
| 2062 WebGLRenderingContextBase::compressedTexImage2D(target, level, internalformat, | 2075 WebGLRenderingContextBase::compressedTexImage2D(target, level, internalformat, |
| 2063 width, height, border, data); | 2076 width, height, border, data); |
| 2064 } | 2077 } |
| 2065 | 2078 |
| 2066 void WebGL2RenderingContextBase::compressedTexImage2D( | 2079 void WebGL2RenderingContextBase::compressedTexImage2D( |
| 2067 GLenum target, | 2080 GLenum target, |
| 2068 GLint level, | 2081 GLint level, |
| 2069 GLenum internalformat, | 2082 GLenum internalformat, |
| 2070 GLsizei width, | 2083 GLsizei width, |
| 2071 GLsizei height, | 2084 GLsizei height, |
| 2072 GLint border, | 2085 GLint border, |
| 2073 DOMArrayBufferView* data, | 2086 const NotShared<DOMArrayBufferView>& data, |
| 2074 GLuint srcOffset, | 2087 GLuint srcOffset, |
| 2075 GLuint srcLengthOverride) { | 2088 GLuint srcLengthOverride) { |
| 2076 if (isContextLost()) | 2089 if (isContextLost()) |
| 2077 return; | 2090 return; |
| 2078 if (m_boundPixelUnpackBuffer) { | 2091 if (m_boundPixelUnpackBuffer) { |
| 2079 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage2D", | 2092 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage2D", |
| 2080 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 2093 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 2081 return; | 2094 return; |
| 2082 } | 2095 } |
| 2083 if (!validateTexture2DBinding("compressedTexImage2D", target)) | 2096 if (!validateTexture2DBinding("compressedTexImage2D", target)) |
| 2084 return; | 2097 return; |
| 2085 if (!validateCompressedTexFormat("compressedTexImage2D", internalformat)) | 2098 if (!validateCompressedTexFormat("compressedTexImage2D", internalformat)) |
| 2086 return; | 2099 return; |
| 2087 if (srcOffset > data->byteLength()) { | 2100 if (srcOffset > data.view()->byteLength()) { |
| 2088 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", | 2101 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", |
| 2089 "srcOffset is out of range"); | 2102 "srcOffset is out of range"); |
| 2090 return; | 2103 return; |
| 2091 } | 2104 } |
| 2092 if (srcLengthOverride == 0) { | 2105 if (srcLengthOverride == 0) { |
| 2093 srcLengthOverride = data->byteLength() - srcOffset; | 2106 srcLengthOverride = data.view()->byteLength() - srcOffset; |
| 2094 } else if (srcLengthOverride > data->byteLength() - srcOffset) { | 2107 } else if (srcLengthOverride > data.view()->byteLength() - srcOffset) { |
| 2095 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", | 2108 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", |
| 2096 "srcLengthOverride is out of range"); | 2109 "srcLengthOverride is out of range"); |
| 2097 return; | 2110 return; |
| 2098 } | 2111 } |
| 2099 contextGL()->CompressedTexImage2D( | 2112 contextGL()->CompressedTexImage2D( |
| 2100 target, level, internalformat, width, height, border, srcLengthOverride, | 2113 target, level, internalformat, width, height, border, srcLengthOverride, |
| 2101 static_cast<uint8_t*>(data->baseAddress()) + srcOffset); | 2114 static_cast<uint8_t*>(data.view()->baseAddress()) + srcOffset); |
| 2102 } | 2115 } |
| 2103 | 2116 |
| 2104 void WebGL2RenderingContextBase::compressedTexImage2D(GLenum target, | 2117 void WebGL2RenderingContextBase::compressedTexImage2D(GLenum target, |
| 2105 GLint level, | 2118 GLint level, |
| 2106 GLenum internalformat, | 2119 GLenum internalformat, |
| 2107 GLsizei width, | 2120 GLsizei width, |
| 2108 GLsizei height, | 2121 GLsizei height, |
| 2109 GLint border, | 2122 GLint border, |
| 2110 GLsizei imageSize, | 2123 GLsizei imageSize, |
| 2111 GLintptr offset) { | 2124 GLintptr offset) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2122 } | 2135 } |
| 2123 | 2136 |
| 2124 void WebGL2RenderingContextBase::compressedTexSubImage2D( | 2137 void WebGL2RenderingContextBase::compressedTexSubImage2D( |
| 2125 GLenum target, | 2138 GLenum target, |
| 2126 GLint level, | 2139 GLint level, |
| 2127 GLint xoffset, | 2140 GLint xoffset, |
| 2128 GLint yoffset, | 2141 GLint yoffset, |
| 2129 GLsizei width, | 2142 GLsizei width, |
| 2130 GLsizei height, | 2143 GLsizei height, |
| 2131 GLenum format, | 2144 GLenum format, |
| 2132 DOMArrayBufferView* data) { | 2145 const NotShared<DOMArrayBufferView>& data) { |
| 2133 if (isContextLost()) | 2146 if (isContextLost()) |
| 2134 return; | 2147 return; |
| 2135 if (m_boundPixelUnpackBuffer) { | 2148 if (m_boundPixelUnpackBuffer) { |
| 2136 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexSubImage2D", | 2149 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexSubImage2D", |
| 2137 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 2150 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 2138 return; | 2151 return; |
| 2139 } | 2152 } |
| 2140 WebGLRenderingContextBase::compressedTexSubImage2D( | 2153 WebGLRenderingContextBase::compressedTexSubImage2D( |
| 2141 target, level, xoffset, yoffset, width, height, format, data); | 2154 target, level, xoffset, yoffset, width, height, format, data); |
| 2142 } | 2155 } |
| 2143 | 2156 |
| 2144 void WebGL2RenderingContextBase::compressedTexSubImage2D( | 2157 void WebGL2RenderingContextBase::compressedTexSubImage2D( |
| 2145 GLenum target, | 2158 GLenum target, |
| 2146 GLint level, | 2159 GLint level, |
| 2147 GLint xoffset, | 2160 GLint xoffset, |
| 2148 GLint yoffset, | 2161 GLint yoffset, |
| 2149 GLsizei width, | 2162 GLsizei width, |
| 2150 GLsizei height, | 2163 GLsizei height, |
| 2151 GLenum format, | 2164 GLenum format, |
| 2152 DOMArrayBufferView* data, | 2165 const NotShared<DOMArrayBufferView>& data, |
| 2153 GLuint srcOffset, | 2166 GLuint srcOffset, |
| 2154 GLuint srcLengthOverride) { | 2167 GLuint srcLengthOverride) { |
| 2155 if (isContextLost()) | 2168 if (isContextLost()) |
| 2156 return; | 2169 return; |
| 2157 if (m_boundPixelUnpackBuffer) { | 2170 if (m_boundPixelUnpackBuffer) { |
| 2158 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexSubImage2D", | 2171 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexSubImage2D", |
| 2159 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 2172 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 2160 return; | 2173 return; |
| 2161 } | 2174 } |
| 2162 if (!validateTexture2DBinding("compressedTexSubImage2D", target)) | 2175 if (!validateTexture2DBinding("compressedTexSubImage2D", target)) |
| 2163 return; | 2176 return; |
| 2164 if (!validateCompressedTexFormat("compressedTexSubImage2D", format)) | 2177 if (!validateCompressedTexFormat("compressedTexSubImage2D", format)) |
| 2165 return; | 2178 return; |
| 2166 if (srcOffset > data->byteLength()) { | 2179 if (srcOffset > data.view()->byteLength()) { |
| 2167 synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage2D", | 2180 synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage2D", |
| 2168 "srcOffset is out of range"); | 2181 "srcOffset is out of range"); |
| 2169 return; | 2182 return; |
| 2170 } | 2183 } |
| 2171 if (srcLengthOverride == 0) { | 2184 if (srcLengthOverride == 0) { |
| 2172 srcLengthOverride = data->byteLength() - srcOffset; | 2185 srcLengthOverride = data.view()->byteLength() - srcOffset; |
| 2173 } else if (srcLengthOverride > data->byteLength() - srcOffset) { | 2186 } else if (srcLengthOverride > data.view()->byteLength() - srcOffset) { |
| 2174 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", | 2187 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", |
| 2175 "srcLengthOverride is out of range"); | 2188 "srcLengthOverride is out of range"); |
| 2176 return; | 2189 return; |
| 2177 } | 2190 } |
| 2178 contextGL()->CompressedTexSubImage2D( | 2191 contextGL()->CompressedTexSubImage2D( |
| 2179 target, level, xoffset, yoffset, width, height, format, srcLengthOverride, | 2192 target, level, xoffset, yoffset, width, height, format, srcLengthOverride, |
| 2180 static_cast<uint8_t*>(data->baseAddress()) + srcOffset); | 2193 static_cast<uint8_t*>(data.view()->baseAddress()) + srcOffset); |
| 2181 } | 2194 } |
| 2182 | 2195 |
| 2183 void WebGL2RenderingContextBase::compressedTexSubImage2D(GLenum target, | 2196 void WebGL2RenderingContextBase::compressedTexSubImage2D(GLenum target, |
| 2184 GLint level, | 2197 GLint level, |
| 2185 GLint xoffset, | 2198 GLint xoffset, |
| 2186 GLint yoffset, | 2199 GLint yoffset, |
| 2187 GLsizei width, | 2200 GLsizei width, |
| 2188 GLsizei height, | 2201 GLsizei height, |
| 2189 GLenum format, | 2202 GLenum format, |
| 2190 GLsizei imageSize, | 2203 GLsizei imageSize, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2202 } | 2215 } |
| 2203 | 2216 |
| 2204 void WebGL2RenderingContextBase::compressedTexImage3D( | 2217 void WebGL2RenderingContextBase::compressedTexImage3D( |
| 2205 GLenum target, | 2218 GLenum target, |
| 2206 GLint level, | 2219 GLint level, |
| 2207 GLenum internalformat, | 2220 GLenum internalformat, |
| 2208 GLsizei width, | 2221 GLsizei width, |
| 2209 GLsizei height, | 2222 GLsizei height, |
| 2210 GLsizei depth, | 2223 GLsizei depth, |
| 2211 GLint border, | 2224 GLint border, |
| 2212 DOMArrayBufferView* data, | 2225 const NotShared<DOMArrayBufferView>& data, |
| 2213 GLuint srcOffset, | 2226 GLuint srcOffset, |
| 2214 GLuint srcLengthOverride) { | 2227 GLuint srcLengthOverride) { |
| 2215 if (isContextLost()) | 2228 if (isContextLost()) |
| 2216 return; | 2229 return; |
| 2217 if (m_boundPixelUnpackBuffer) { | 2230 if (m_boundPixelUnpackBuffer) { |
| 2218 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage3D", | 2231 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexImage3D", |
| 2219 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 2232 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 2220 return; | 2233 return; |
| 2221 } | 2234 } |
| 2222 if (!validateTexture3DBinding("compressedTexImage3D", target)) | 2235 if (!validateTexture3DBinding("compressedTexImage3D", target)) |
| 2223 return; | 2236 return; |
| 2224 if (!validateCompressedTexFormat("compressedTexImage3D", internalformat)) | 2237 if (!validateCompressedTexFormat("compressedTexImage3D", internalformat)) |
| 2225 return; | 2238 return; |
| 2226 if (srcOffset > data->byteLength()) { | 2239 if (srcOffset > data.view()->byteLength()) { |
| 2227 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage3D", | 2240 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage3D", |
| 2228 "srcOffset is out of range"); | 2241 "srcOffset is out of range"); |
| 2229 return; | 2242 return; |
| 2230 } | 2243 } |
| 2231 if (srcLengthOverride == 0) { | 2244 if (srcLengthOverride == 0) { |
| 2232 srcLengthOverride = data->byteLength() - srcOffset; | 2245 srcLengthOverride = data.view()->byteLength() - srcOffset; |
| 2233 } else if (srcLengthOverride > data->byteLength() - srcOffset) { | 2246 } else if (srcLengthOverride > data.view()->byteLength() - srcOffset) { |
| 2234 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage3D", | 2247 synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage3D", |
| 2235 "srcLengthOverride is out of range"); | 2248 "srcLengthOverride is out of range"); |
| 2236 return; | 2249 return; |
| 2237 } | 2250 } |
| 2238 contextGL()->CompressedTexImage3D( | 2251 contextGL()->CompressedTexImage3D( |
| 2239 target, level, internalformat, width, height, depth, border, | 2252 target, level, internalformat, width, height, depth, border, |
| 2240 srcLengthOverride, | 2253 srcLengthOverride, |
| 2241 static_cast<uint8_t*>(data->baseAddress()) + srcOffset); | 2254 static_cast<uint8_t*>(data.view()->baseAddress()) + srcOffset); |
| 2242 } | 2255 } |
| 2243 | 2256 |
| 2244 void WebGL2RenderingContextBase::compressedTexImage3D(GLenum target, | 2257 void WebGL2RenderingContextBase::compressedTexImage3D(GLenum target, |
| 2245 GLint level, | 2258 GLint level, |
| 2246 GLenum internalformat, | 2259 GLenum internalformat, |
| 2247 GLsizei width, | 2260 GLsizei width, |
| 2248 GLsizei height, | 2261 GLsizei height, |
| 2249 GLsizei depth, | 2262 GLsizei depth, |
| 2250 GLint border, | 2263 GLint border, |
| 2251 GLsizei imageSize, | 2264 GLsizei imageSize, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2265 void WebGL2RenderingContextBase::compressedTexSubImage3D( | 2278 void WebGL2RenderingContextBase::compressedTexSubImage3D( |
| 2266 GLenum target, | 2279 GLenum target, |
| 2267 GLint level, | 2280 GLint level, |
| 2268 GLint xoffset, | 2281 GLint xoffset, |
| 2269 GLint yoffset, | 2282 GLint yoffset, |
| 2270 GLint zoffset, | 2283 GLint zoffset, |
| 2271 GLsizei width, | 2284 GLsizei width, |
| 2272 GLsizei height, | 2285 GLsizei height, |
| 2273 GLsizei depth, | 2286 GLsizei depth, |
| 2274 GLenum format, | 2287 GLenum format, |
| 2275 DOMArrayBufferView* data, | 2288 const NotShared<DOMArrayBufferView>& data, |
| 2276 GLuint srcOffset, | 2289 GLuint srcOffset, |
| 2277 GLuint srcLengthOverride) { | 2290 GLuint srcLengthOverride) { |
| 2278 if (isContextLost()) | 2291 if (isContextLost()) |
| 2279 return; | 2292 return; |
| 2280 if (m_boundPixelUnpackBuffer) { | 2293 if (m_boundPixelUnpackBuffer) { |
| 2281 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexSubImage3D", | 2294 synthesizeGLError(GL_INVALID_OPERATION, "compressedTexSubImage3D", |
| 2282 "a buffer is bound to PIXEL_UNPACK_BUFFER"); | 2295 "a buffer is bound to PIXEL_UNPACK_BUFFER"); |
| 2283 return; | 2296 return; |
| 2284 } | 2297 } |
| 2285 if (!validateTexture3DBinding("compressedTexSubImage3D", target)) | 2298 if (!validateTexture3DBinding("compressedTexSubImage3D", target)) |
| 2286 return; | 2299 return; |
| 2287 if (!validateCompressedTexFormat("compressedTexSubImage3D", format)) | 2300 if (!validateCompressedTexFormat("compressedTexSubImage3D", format)) |
| 2288 return; | 2301 return; |
| 2289 if (srcOffset > data->byteLength()) { | 2302 if (srcOffset > data.view()->byteLength()) { |
| 2290 synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage3D", | 2303 synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage3D", |
| 2291 "srcOffset is out of range"); | 2304 "srcOffset is out of range"); |
| 2292 return; | 2305 return; |
| 2293 } | 2306 } |
| 2294 if (srcLengthOverride == 0) { | 2307 if (srcLengthOverride == 0) { |
| 2295 srcLengthOverride = data->byteLength() - srcOffset; | 2308 srcLengthOverride = data.view()->byteLength() - srcOffset; |
| 2296 } else if (srcLengthOverride > data->byteLength() - srcOffset) { | 2309 } else if (srcLengthOverride > data.view()->byteLength() - srcOffset) { |
| 2297 synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage3D", | 2310 synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage3D", |
| 2298 "srcLengthOverride is out of range"); | 2311 "srcLengthOverride is out of range"); |
| 2299 return; | 2312 return; |
| 2300 } | 2313 } |
| 2301 contextGL()->CompressedTexSubImage3D( | 2314 contextGL()->CompressedTexSubImage3D( |
| 2302 target, level, xoffset, yoffset, zoffset, width, height, depth, format, | 2315 target, level, xoffset, yoffset, zoffset, width, height, depth, format, |
| 2303 srcLengthOverride, | 2316 srcLengthOverride, |
| 2304 static_cast<uint8_t*>(data->baseAddress()) + srcOffset); | 2317 static_cast<uint8_t*>(data.view()->baseAddress()) + srcOffset); |
| 2305 } | 2318 } |
| 2306 | 2319 |
| 2307 void WebGL2RenderingContextBase::compressedTexSubImage3D(GLenum target, | 2320 void WebGL2RenderingContextBase::compressedTexSubImage3D(GLenum target, |
| 2308 GLint level, | 2321 GLint level, |
| 2309 GLint xoffset, | 2322 GLint xoffset, |
| 2310 GLint yoffset, | 2323 GLint yoffset, |
| 2311 GLint zoffset, | 2324 GLint zoffset, |
| 2312 GLsizei width, | 2325 GLsizei width, |
| 2313 GLsizei height, | 2326 GLsizei height, |
| 2314 GLsizei depth, | 2327 GLsizei depth, |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 | 2783 |
| 2771 contextGL()->Uniform4uiv( | 2784 contextGL()->Uniform4uiv( |
| 2772 location->location(), | 2785 location->location(), |
| 2773 (srcLength ? srcLength : (value.size() - srcOffset)) >> 2, | 2786 (srcLength ? srcLength : (value.size() - srcOffset)) >> 2, |
| 2774 value.data() + srcOffset); | 2787 value.data() + srcOffset); |
| 2775 } | 2788 } |
| 2776 | 2789 |
| 2777 void WebGL2RenderingContextBase::uniformMatrix2fv( | 2790 void WebGL2RenderingContextBase::uniformMatrix2fv( |
| 2778 const WebGLUniformLocation* location, | 2791 const WebGLUniformLocation* location, |
| 2779 GLboolean transpose, | 2792 GLboolean transpose, |
| 2780 DOMFloat32Array* v, | 2793 const NotShared<DOMFloat32Array>& v, |
| 2781 GLuint srcOffset, | 2794 GLuint srcOffset, |
| 2782 GLuint srcLength) { | 2795 GLuint srcLength) { |
| 2783 if (isContextLost() || | 2796 if (isContextLost() || |
| 2784 !validateUniformMatrixParameters("uniformMatrix2fv", location, transpose, | 2797 !validateUniformMatrixParameters("uniformMatrix2fv", location, transpose, |
| 2785 v, 4, srcOffset, srcLength)) | 2798 v.view(), 4, srcOffset, srcLength)) |
| 2786 return; | 2799 return; |
| 2787 contextGL()->UniformMatrix2fv( | 2800 contextGL()->UniformMatrix2fv( |
| 2788 location->location(), | 2801 location->location(), |
| 2789 (srcLength ? srcLength : (v->length() - srcOffset)) >> 2, transpose, | 2802 (srcLength ? srcLength : (v.view()->length() - srcOffset)) >> 2, |
| 2790 v->data() + srcOffset); | 2803 transpose, v.view()->data() + srcOffset); |
| 2791 } | 2804 } |
| 2792 | 2805 |
| 2793 void WebGL2RenderingContextBase::uniformMatrix2fv( | 2806 void WebGL2RenderingContextBase::uniformMatrix2fv( |
| 2794 const WebGLUniformLocation* location, | 2807 const WebGLUniformLocation* location, |
| 2795 GLboolean transpose, | 2808 GLboolean transpose, |
| 2796 Vector<GLfloat>& v, | 2809 Vector<GLfloat>& v, |
| 2797 GLuint srcOffset, | 2810 GLuint srcOffset, |
| 2798 GLuint srcLength) { | 2811 GLuint srcLength) { |
| 2799 if (isContextLost() || | 2812 if (isContextLost() || |
| 2800 !validateUniformMatrixParameters("uniformMatrix2fv", location, transpose, | 2813 !validateUniformMatrixParameters("uniformMatrix2fv", location, transpose, |
| 2801 v.data(), v.size(), 4, srcOffset, | 2814 v.data(), v.size(), 4, srcOffset, |
| 2802 srcLength)) | 2815 srcLength)) |
| 2803 return; | 2816 return; |
| 2804 contextGL()->UniformMatrix2fv( | 2817 contextGL()->UniformMatrix2fv( |
| 2805 location->location(), | 2818 location->location(), |
| 2806 (srcLength ? srcLength : (v.size() - srcOffset)) >> 2, transpose, | 2819 (srcLength ? srcLength : (v.size() - srcOffset)) >> 2, transpose, |
| 2807 v.data() + srcOffset); | 2820 v.data() + srcOffset); |
| 2808 } | 2821 } |
| 2809 | 2822 |
| 2810 void WebGL2RenderingContextBase::uniformMatrix3fv( | 2823 void WebGL2RenderingContextBase::uniformMatrix3fv( |
| 2811 const WebGLUniformLocation* location, | 2824 const WebGLUniformLocation* location, |
| 2812 GLboolean transpose, | 2825 GLboolean transpose, |
| 2813 DOMFloat32Array* v, | 2826 const NotShared<DOMFloat32Array>& v, |
| 2814 GLuint srcOffset, | 2827 GLuint srcOffset, |
| 2815 GLuint srcLength) { | 2828 GLuint srcLength) { |
| 2816 if (isContextLost() || | 2829 if (isContextLost() || |
| 2817 !validateUniformMatrixParameters("uniformMatrix3fv", location, transpose, | 2830 !validateUniformMatrixParameters("uniformMatrix3fv", location, transpose, |
| 2818 v, 9, srcOffset, srcLength)) | 2831 v.view(), 9, srcOffset, srcLength)) |
| 2819 return; | 2832 return; |
| 2820 contextGL()->UniformMatrix3fv( | 2833 contextGL()->UniformMatrix3fv( |
| 2821 location->location(), | 2834 location->location(), |
| 2822 (srcLength ? srcLength : (v->length() - srcOffset)) / 9, transpose, | 2835 (srcLength ? srcLength : (v.view()->length() - srcOffset)) / 9, transpose, |
| 2823 v->data() + srcOffset); | 2836 v.view()->data() + srcOffset); |
| 2824 } | 2837 } |
| 2825 | 2838 |
| 2826 void WebGL2RenderingContextBase::uniformMatrix3fv( | 2839 void WebGL2RenderingContextBase::uniformMatrix3fv( |
| 2827 const WebGLUniformLocation* location, | 2840 const WebGLUniformLocation* location, |
| 2828 GLboolean transpose, | 2841 GLboolean transpose, |
| 2829 Vector<GLfloat>& v, | 2842 Vector<GLfloat>& v, |
| 2830 GLuint srcOffset, | 2843 GLuint srcOffset, |
| 2831 GLuint srcLength) { | 2844 GLuint srcLength) { |
| 2832 if (isContextLost() || | 2845 if (isContextLost() || |
| 2833 !validateUniformMatrixParameters("uniformMatrix3fv", location, transpose, | 2846 !validateUniformMatrixParameters("uniformMatrix3fv", location, transpose, |
| 2834 v.data(), v.size(), 9, srcOffset, | 2847 v.data(), v.size(), 9, srcOffset, |
| 2835 srcLength)) | 2848 srcLength)) |
| 2836 return; | 2849 return; |
| 2837 contextGL()->UniformMatrix3fv( | 2850 contextGL()->UniformMatrix3fv( |
| 2838 location->location(), | 2851 location->location(), |
| 2839 (srcLength ? srcLength : (v.size() - srcOffset)) / 9, transpose, | 2852 (srcLength ? srcLength : (v.size() - srcOffset)) / 9, transpose, |
| 2840 v.data() + srcOffset); | 2853 v.data() + srcOffset); |
| 2841 } | 2854 } |
| 2842 | 2855 |
| 2843 void WebGL2RenderingContextBase::uniformMatrix4fv( | 2856 void WebGL2RenderingContextBase::uniformMatrix4fv( |
| 2844 const WebGLUniformLocation* location, | 2857 const WebGLUniformLocation* location, |
| 2845 GLboolean transpose, | 2858 GLboolean transpose, |
| 2846 DOMFloat32Array* v, | 2859 const NotShared<DOMFloat32Array>& v, |
| 2847 GLuint srcOffset, | 2860 GLuint srcOffset, |
| 2848 GLuint srcLength) { | 2861 GLuint srcLength) { |
| 2849 if (isContextLost() || | 2862 if (isContextLost() || |
| 2850 !validateUniformMatrixParameters("uniformMatrix4fv", location, transpose, | 2863 !validateUniformMatrixParameters("uniformMatrix4fv", location, transpose, |
| 2851 v, 16, srcOffset, srcLength)) | 2864 v.view(), 16, srcOffset, srcLength)) |
| 2852 return; | 2865 return; |
| 2853 contextGL()->UniformMatrix4fv( | 2866 contextGL()->UniformMatrix4fv( |
| 2854 location->location(), | 2867 location->location(), |
| 2855 (srcLength ? srcLength : (v->length() - srcOffset)) >> 4, transpose, | 2868 (srcLength ? srcLength : (v.view()->length() - srcOffset)) >> 4, |
| 2856 v->data() + srcOffset); | 2869 transpose, v.view()->data() + srcOffset); |
| 2857 } | 2870 } |
| 2858 | 2871 |
| 2859 void WebGL2RenderingContextBase::uniformMatrix4fv( | 2872 void WebGL2RenderingContextBase::uniformMatrix4fv( |
| 2860 const WebGLUniformLocation* location, | 2873 const WebGLUniformLocation* location, |
| 2861 GLboolean transpose, | 2874 GLboolean transpose, |
| 2862 Vector<GLfloat>& v, | 2875 Vector<GLfloat>& v, |
| 2863 GLuint srcOffset, | 2876 GLuint srcOffset, |
| 2864 GLuint srcLength) { | 2877 GLuint srcLength) { |
| 2865 if (isContextLost() || | 2878 if (isContextLost() || |
| 2866 !validateUniformMatrixParameters("uniformMatrix4fv", location, transpose, | 2879 !validateUniformMatrixParameters("uniformMatrix4fv", location, transpose, |
| 2867 v.data(), v.size(), 16, srcOffset, | 2880 v.data(), v.size(), 16, srcOffset, |
| 2868 srcLength)) | 2881 srcLength)) |
| 2869 return; | 2882 return; |
| 2870 contextGL()->UniformMatrix4fv( | 2883 contextGL()->UniformMatrix4fv( |
| 2871 location->location(), | 2884 location->location(), |
| 2872 (srcLength ? srcLength : (v.size() - srcOffset)) >> 4, transpose, | 2885 (srcLength ? srcLength : (v.size() - srcOffset)) >> 4, transpose, |
| 2873 v.data() + srcOffset); | 2886 v.data() + srcOffset); |
| 2874 } | 2887 } |
| 2875 | 2888 |
| 2876 void WebGL2RenderingContextBase::uniformMatrix2x3fv( | 2889 void WebGL2RenderingContextBase::uniformMatrix2x3fv( |
| 2877 const WebGLUniformLocation* location, | 2890 const WebGLUniformLocation* location, |
| 2878 GLboolean transpose, | 2891 GLboolean transpose, |
| 2879 DOMFloat32Array* value, | 2892 const NotShared<DOMFloat32Array>& value, |
| 2880 GLuint srcOffset, | 2893 GLuint srcOffset, |
| 2881 GLuint srcLength) { | 2894 GLuint srcLength) { |
| 2882 if (isContextLost() || | 2895 if (isContextLost() || !validateUniformMatrixParameters( |
| 2883 !validateUniformMatrixParameters("uniformMatrix2x3fv", location, | 2896 "uniformMatrix2x3fv", location, transpose, |
| 2884 transpose, value, 6, srcOffset, | 2897 value.view(), 6, srcOffset, srcLength)) |
| 2885 srcLength)) | |
| 2886 return; | 2898 return; |
| 2887 contextGL()->UniformMatrix2x3fv( | 2899 contextGL()->UniformMatrix2x3fv( |
| 2888 location->location(), | 2900 location->location(), |
| 2889 (srcLength ? srcLength : (value->length() - srcOffset)) / 6, transpose, | 2901 (srcLength ? srcLength : (value.view()->length() - srcOffset)) / 6, |
| 2890 value->data() + srcOffset); | 2902 transpose, value.view()->data() + srcOffset); |
| 2891 } | 2903 } |
| 2892 | 2904 |
| 2893 void WebGL2RenderingContextBase::uniformMatrix2x3fv( | 2905 void WebGL2RenderingContextBase::uniformMatrix2x3fv( |
| 2894 const WebGLUniformLocation* location, | 2906 const WebGLUniformLocation* location, |
| 2895 GLboolean transpose, | 2907 GLboolean transpose, |
| 2896 Vector<GLfloat>& value, | 2908 Vector<GLfloat>& value, |
| 2897 GLuint srcOffset, | 2909 GLuint srcOffset, |
| 2898 GLuint srcLength) { | 2910 GLuint srcLength) { |
| 2899 if (isContextLost() || | 2911 if (isContextLost() || |
| 2900 !validateUniformMatrixParameters("uniformMatrix2x3fv", location, | 2912 !validateUniformMatrixParameters("uniformMatrix2x3fv", location, |
| 2901 transpose, value.data(), value.size(), 6, | 2913 transpose, value.data(), value.size(), 6, |
| 2902 srcOffset, srcLength)) | 2914 srcOffset, srcLength)) |
| 2903 return; | 2915 return; |
| 2904 contextGL()->UniformMatrix2x3fv( | 2916 contextGL()->UniformMatrix2x3fv( |
| 2905 location->location(), | 2917 location->location(), |
| 2906 (srcLength ? srcLength : (value.size() - srcOffset)) / 6, transpose, | 2918 (srcLength ? srcLength : (value.size() - srcOffset)) / 6, transpose, |
| 2907 value.data() + srcOffset); | 2919 value.data() + srcOffset); |
| 2908 } | 2920 } |
| 2909 | 2921 |
| 2910 void WebGL2RenderingContextBase::uniformMatrix3x2fv( | 2922 void WebGL2RenderingContextBase::uniformMatrix3x2fv( |
| 2911 const WebGLUniformLocation* location, | 2923 const WebGLUniformLocation* location, |
| 2912 GLboolean transpose, | 2924 GLboolean transpose, |
| 2913 DOMFloat32Array* value, | 2925 const NotShared<DOMFloat32Array>& value, |
| 2914 GLuint srcOffset, | 2926 GLuint srcOffset, |
| 2915 GLuint srcLength) { | 2927 GLuint srcLength) { |
| 2916 if (isContextLost() || | 2928 if (isContextLost() || !validateUniformMatrixParameters( |
| 2917 !validateUniformMatrixParameters("uniformMatrix3x2fv", location, | 2929 "uniformMatrix3x2fv", location, transpose, |
| 2918 transpose, value, 6, srcOffset, | 2930 value.view(), 6, srcOffset, srcLength)) |
| 2919 srcLength)) | |
| 2920 return; | 2931 return; |
| 2921 contextGL()->UniformMatrix3x2fv( | 2932 contextGL()->UniformMatrix3x2fv( |
| 2922 location->location(), | 2933 location->location(), |
| 2923 (srcLength ? srcLength : (value->length() - srcOffset)) / 6, transpose, | 2934 (srcLength ? srcLength : (value.view()->length() - srcOffset)) / 6, |
| 2924 value->data() + srcOffset); | 2935 transpose, value.view()->data() + srcOffset); |
| 2925 } | 2936 } |
| 2926 | 2937 |
| 2927 void WebGL2RenderingContextBase::uniformMatrix3x2fv( | 2938 void WebGL2RenderingContextBase::uniformMatrix3x2fv( |
| 2928 const WebGLUniformLocation* location, | 2939 const WebGLUniformLocation* location, |
| 2929 GLboolean transpose, | 2940 GLboolean transpose, |
| 2930 Vector<GLfloat>& value, | 2941 Vector<GLfloat>& value, |
| 2931 GLuint srcOffset, | 2942 GLuint srcOffset, |
| 2932 GLuint srcLength) { | 2943 GLuint srcLength) { |
| 2933 if (isContextLost() || | 2944 if (isContextLost() || |
| 2934 !validateUniformMatrixParameters("uniformMatrix3x2fv", location, | 2945 !validateUniformMatrixParameters("uniformMatrix3x2fv", location, |
| 2935 transpose, value.data(), value.size(), 6, | 2946 transpose, value.data(), value.size(), 6, |
| 2936 srcOffset, srcLength)) | 2947 srcOffset, srcLength)) |
| 2937 return; | 2948 return; |
| 2938 contextGL()->UniformMatrix3x2fv( | 2949 contextGL()->UniformMatrix3x2fv( |
| 2939 location->location(), | 2950 location->location(), |
| 2940 (srcLength ? srcLength : (value.size() - srcOffset)) / 6, transpose, | 2951 (srcLength ? srcLength : (value.size() - srcOffset)) / 6, transpose, |
| 2941 value.data() + srcOffset); | 2952 value.data() + srcOffset); |
| 2942 } | 2953 } |
| 2943 | 2954 |
| 2944 void WebGL2RenderingContextBase::uniformMatrix2x4fv( | 2955 void WebGL2RenderingContextBase::uniformMatrix2x4fv( |
| 2945 const WebGLUniformLocation* location, | 2956 const WebGLUniformLocation* location, |
| 2946 GLboolean transpose, | 2957 GLboolean transpose, |
| 2947 DOMFloat32Array* value, | 2958 const NotShared<DOMFloat32Array>& value, |
| 2948 GLuint srcOffset, | 2959 GLuint srcOffset, |
| 2949 GLuint srcLength) { | 2960 GLuint srcLength) { |
| 2950 if (isContextLost() || | 2961 if (isContextLost() || !validateUniformMatrixParameters( |
| 2951 !validateUniformMatrixParameters("uniformMatrix2x4fv", location, | 2962 "uniformMatrix2x4fv", location, transpose, |
| 2952 transpose, value, 8, srcOffset, | 2963 value.view(), 8, srcOffset, srcLength)) |
| 2953 srcLength)) | |
| 2954 return; | 2964 return; |
| 2955 contextGL()->UniformMatrix2x4fv( | 2965 contextGL()->UniformMatrix2x4fv( |
| 2956 location->location(), | 2966 location->location(), |
| 2957 (srcLength ? srcLength : (value->length() - srcOffset)) >> 3, transpose, | 2967 (srcLength ? srcLength : (value.view()->length() - srcOffset)) >> 3, |
| 2958 value->data() + srcOffset); | 2968 transpose, value.view()->data() + srcOffset); |
| 2959 } | 2969 } |
| 2960 | 2970 |
| 2961 void WebGL2RenderingContextBase::uniformMatrix2x4fv( | 2971 void WebGL2RenderingContextBase::uniformMatrix2x4fv( |
| 2962 const WebGLUniformLocation* location, | 2972 const WebGLUniformLocation* location, |
| 2963 GLboolean transpose, | 2973 GLboolean transpose, |
| 2964 Vector<GLfloat>& value, | 2974 Vector<GLfloat>& value, |
| 2965 GLuint srcOffset, | 2975 GLuint srcOffset, |
| 2966 GLuint srcLength) { | 2976 GLuint srcLength) { |
| 2967 if (isContextLost() || | 2977 if (isContextLost() || |
| 2968 !validateUniformMatrixParameters("uniformMatrix2x4fv", location, | 2978 !validateUniformMatrixParameters("uniformMatrix2x4fv", location, |
| 2969 transpose, value.data(), value.size(), 8, | 2979 transpose, value.data(), value.size(), 8, |
| 2970 srcOffset, srcLength)) | 2980 srcOffset, srcLength)) |
| 2971 return; | 2981 return; |
| 2972 contextGL()->UniformMatrix2x4fv( | 2982 contextGL()->UniformMatrix2x4fv( |
| 2973 location->location(), | 2983 location->location(), |
| 2974 (srcLength ? srcLength : (value.size() - srcOffset)) >> 3, transpose, | 2984 (srcLength ? srcLength : (value.size() - srcOffset)) >> 3, transpose, |
| 2975 value.data() + srcOffset); | 2985 value.data() + srcOffset); |
| 2976 } | 2986 } |
| 2977 | 2987 |
| 2978 void WebGL2RenderingContextBase::uniformMatrix4x2fv( | 2988 void WebGL2RenderingContextBase::uniformMatrix4x2fv( |
| 2979 const WebGLUniformLocation* location, | 2989 const WebGLUniformLocation* location, |
| 2980 GLboolean transpose, | 2990 GLboolean transpose, |
| 2981 DOMFloat32Array* value, | 2991 const NotShared<DOMFloat32Array>& value, |
| 2982 GLuint srcOffset, | 2992 GLuint srcOffset, |
| 2983 GLuint srcLength) { | 2993 GLuint srcLength) { |
| 2984 if (isContextLost() || | 2994 if (isContextLost() || !validateUniformMatrixParameters( |
| 2985 !validateUniformMatrixParameters("uniformMatrix4x2fv", location, | 2995 "uniformMatrix4x2fv", location, transpose, |
| 2986 transpose, value, 8, srcOffset, | 2996 value.view(), 8, srcOffset, srcLength)) |
| 2987 srcLength)) | |
| 2988 return; | 2997 return; |
| 2989 contextGL()->UniformMatrix4x2fv( | 2998 contextGL()->UniformMatrix4x2fv( |
| 2990 location->location(), | 2999 location->location(), |
| 2991 (srcLength ? srcLength : (value->length() - srcOffset)) >> 3, transpose, | 3000 (srcLength ? srcLength : (value.view()->length() - srcOffset)) >> 3, |
| 2992 value->data() + srcOffset); | 3001 transpose, value.view()->data() + srcOffset); |
| 2993 } | 3002 } |
| 2994 | 3003 |
| 2995 void WebGL2RenderingContextBase::uniformMatrix4x2fv( | 3004 void WebGL2RenderingContextBase::uniformMatrix4x2fv( |
| 2996 const WebGLUniformLocation* location, | 3005 const WebGLUniformLocation* location, |
| 2997 GLboolean transpose, | 3006 GLboolean transpose, |
| 2998 Vector<GLfloat>& value, | 3007 Vector<GLfloat>& value, |
| 2999 GLuint srcOffset, | 3008 GLuint srcOffset, |
| 3000 GLuint srcLength) { | 3009 GLuint srcLength) { |
| 3001 if (isContextLost() || | 3010 if (isContextLost() || |
| 3002 !validateUniformMatrixParameters("uniformMatrix4x2fv", location, | 3011 !validateUniformMatrixParameters("uniformMatrix4x2fv", location, |
| 3003 transpose, value.data(), value.size(), 8, | 3012 transpose, value.data(), value.size(), 8, |
| 3004 srcOffset, srcLength)) | 3013 srcOffset, srcLength)) |
| 3005 return; | 3014 return; |
| 3006 contextGL()->UniformMatrix4x2fv( | 3015 contextGL()->UniformMatrix4x2fv( |
| 3007 location->location(), | 3016 location->location(), |
| 3008 (srcLength ? srcLength : (value.size() - srcOffset)) >> 3, transpose, | 3017 (srcLength ? srcLength : (value.size() - srcOffset)) >> 3, transpose, |
| 3009 value.data() + srcOffset); | 3018 value.data() + srcOffset); |
| 3010 } | 3019 } |
| 3011 | 3020 |
| 3012 void WebGL2RenderingContextBase::uniformMatrix3x4fv( | 3021 void WebGL2RenderingContextBase::uniformMatrix3x4fv( |
| 3013 const WebGLUniformLocation* location, | 3022 const WebGLUniformLocation* location, |
| 3014 GLboolean transpose, | 3023 GLboolean transpose, |
| 3015 DOMFloat32Array* value, | 3024 const NotShared<DOMFloat32Array>& value, |
| 3016 GLuint srcOffset, | 3025 GLuint srcOffset, |
| 3017 GLuint srcLength) { | 3026 GLuint srcLength) { |
| 3018 if (isContextLost() || | 3027 if (isContextLost() || !validateUniformMatrixParameters( |
| 3019 !validateUniformMatrixParameters("uniformMatrix3x4fv", location, | 3028 "uniformMatrix3x4fv", location, transpose, |
| 3020 transpose, value, 12, srcOffset, | 3029 value.view(), 12, srcOffset, srcLength)) |
| 3021 srcLength)) | |
| 3022 return; | 3030 return; |
| 3023 contextGL()->UniformMatrix3x4fv( | 3031 contextGL()->UniformMatrix3x4fv( |
| 3024 location->location(), | 3032 location->location(), |
| 3025 (srcLength ? srcLength : (value->length() - srcOffset)) / 12, transpose, | 3033 (srcLength ? srcLength : (value.view()->length() - srcOffset)) / 12, |
| 3026 value->data() + srcOffset); | 3034 transpose, value.view()->data() + srcOffset); |
| 3027 } | 3035 } |
| 3028 | 3036 |
| 3029 void WebGL2RenderingContextBase::uniformMatrix3x4fv( | 3037 void WebGL2RenderingContextBase::uniformMatrix3x4fv( |
| 3030 const WebGLUniformLocation* location, | 3038 const WebGLUniformLocation* location, |
| 3031 GLboolean transpose, | 3039 GLboolean transpose, |
| 3032 Vector<GLfloat>& value, | 3040 Vector<GLfloat>& value, |
| 3033 GLuint srcOffset, | 3041 GLuint srcOffset, |
| 3034 GLuint srcLength) { | 3042 GLuint srcLength) { |
| 3035 if (isContextLost() || | 3043 if (isContextLost() || |
| 3036 !validateUniformMatrixParameters("uniformMatrix3x4fv", location, | 3044 !validateUniformMatrixParameters("uniformMatrix3x4fv", location, |
| 3037 transpose, value.data(), value.size(), | 3045 transpose, value.data(), value.size(), |
| 3038 12, srcOffset, srcLength)) | 3046 12, srcOffset, srcLength)) |
| 3039 return; | 3047 return; |
| 3040 contextGL()->UniformMatrix3x4fv( | 3048 contextGL()->UniformMatrix3x4fv( |
| 3041 location->location(), | 3049 location->location(), |
| 3042 (srcLength ? srcLength : (value.size() - srcOffset)) / 12, transpose, | 3050 (srcLength ? srcLength : (value.size() - srcOffset)) / 12, transpose, |
| 3043 value.data() + srcOffset); | 3051 value.data() + srcOffset); |
| 3044 } | 3052 } |
| 3045 | 3053 |
| 3046 void WebGL2RenderingContextBase::uniformMatrix4x3fv( | 3054 void WebGL2RenderingContextBase::uniformMatrix4x3fv( |
| 3047 const WebGLUniformLocation* location, | 3055 const WebGLUniformLocation* location, |
| 3048 GLboolean transpose, | 3056 GLboolean transpose, |
| 3049 DOMFloat32Array* value, | 3057 const NotShared<DOMFloat32Array>& value, |
| 3050 GLuint srcOffset, | 3058 GLuint srcOffset, |
| 3051 GLuint srcLength) { | 3059 GLuint srcLength) { |
| 3052 if (isContextLost() || | 3060 if (isContextLost() || !validateUniformMatrixParameters( |
| 3053 !validateUniformMatrixParameters("uniformMatrix4x3fv", location, | 3061 "uniformMatrix4x3fv", location, transpose, |
| 3054 transpose, value, 12, srcOffset, | 3062 value.view(), 12, srcOffset, srcLength)) |
| 3055 srcLength)) | |
| 3056 return; | 3063 return; |
| 3057 contextGL()->UniformMatrix4x3fv( | 3064 contextGL()->UniformMatrix4x3fv( |
| 3058 location->location(), | 3065 location->location(), |
| 3059 (srcLength ? srcLength : (value->length() - srcOffset)) / 12, transpose, | 3066 (srcLength ? srcLength : (value.view()->length() - srcOffset)) / 12, |
| 3060 value->data() + srcOffset); | 3067 transpose, value.view()->data() + srcOffset); |
| 3061 } | 3068 } |
| 3062 | 3069 |
| 3063 void WebGL2RenderingContextBase::uniformMatrix4x3fv( | 3070 void WebGL2RenderingContextBase::uniformMatrix4x3fv( |
| 3064 const WebGLUniformLocation* location, | 3071 const WebGLUniformLocation* location, |
| 3065 GLboolean transpose, | 3072 GLboolean transpose, |
| 3066 Vector<GLfloat>& value, | 3073 Vector<GLfloat>& value, |
| 3067 GLuint srcOffset, | 3074 GLuint srcOffset, |
| 3068 GLuint srcLength) { | 3075 GLuint srcLength) { |
| 3069 if (isContextLost() || | 3076 if (isContextLost() || |
| 3070 !validateUniformMatrixParameters("uniformMatrix4x3fv", location, | 3077 !validateUniformMatrixParameters("uniformMatrix4x3fv", location, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3169 | 3176 |
| 3170 void WebGL2RenderingContextBase::uniform4iv( | 3177 void WebGL2RenderingContextBase::uniform4iv( |
| 3171 const WebGLUniformLocation* location, | 3178 const WebGLUniformLocation* location, |
| 3172 Vector<GLint>& v) { | 3179 Vector<GLint>& v) { |
| 3173 WebGLRenderingContextBase::uniform4iv(location, v); | 3180 WebGLRenderingContextBase::uniform4iv(location, v); |
| 3174 } | 3181 } |
| 3175 | 3182 |
| 3176 void WebGL2RenderingContextBase::uniformMatrix2fv( | 3183 void WebGL2RenderingContextBase::uniformMatrix2fv( |
| 3177 const WebGLUniformLocation* location, | 3184 const WebGLUniformLocation* location, |
| 3178 GLboolean transpose, | 3185 GLboolean transpose, |
| 3179 DOMFloat32Array* v) { | 3186 const NotShared<DOMFloat32Array>& v) { |
| 3180 WebGLRenderingContextBase::uniformMatrix2fv(location, transpose, v); | 3187 WebGLRenderingContextBase::uniformMatrix2fv(location, transpose, v); |
| 3181 } | 3188 } |
| 3182 | 3189 |
| 3183 void WebGL2RenderingContextBase::uniformMatrix2fv( | 3190 void WebGL2RenderingContextBase::uniformMatrix2fv( |
| 3184 const WebGLUniformLocation* location, | 3191 const WebGLUniformLocation* location, |
| 3185 GLboolean transpose, | 3192 GLboolean transpose, |
| 3186 Vector<GLfloat>& v) { | 3193 Vector<GLfloat>& v) { |
| 3187 WebGLRenderingContextBase::uniformMatrix2fv(location, transpose, v); | 3194 WebGLRenderingContextBase::uniformMatrix2fv(location, transpose, v); |
| 3188 } | 3195 } |
| 3189 | 3196 |
| 3190 void WebGL2RenderingContextBase::uniformMatrix3fv( | 3197 void WebGL2RenderingContextBase::uniformMatrix3fv( |
| 3191 const WebGLUniformLocation* location, | 3198 const WebGLUniformLocation* location, |
| 3192 GLboolean transpose, | 3199 GLboolean transpose, |
| 3193 DOMFloat32Array* v) { | 3200 const NotShared<DOMFloat32Array>& v) { |
| 3194 WebGLRenderingContextBase::uniformMatrix3fv(location, transpose, v); | 3201 WebGLRenderingContextBase::uniformMatrix3fv(location, transpose, v); |
| 3195 } | 3202 } |
| 3196 | 3203 |
| 3197 void WebGL2RenderingContextBase::uniformMatrix3fv( | 3204 void WebGL2RenderingContextBase::uniformMatrix3fv( |
| 3198 const WebGLUniformLocation* location, | 3205 const WebGLUniformLocation* location, |
| 3199 GLboolean transpose, | 3206 GLboolean transpose, |
| 3200 Vector<GLfloat>& v) { | 3207 Vector<GLfloat>& v) { |
| 3201 WebGLRenderingContextBase::uniformMatrix3fv(location, transpose, v); | 3208 WebGLRenderingContextBase::uniformMatrix3fv(location, transpose, v); |
| 3202 } | 3209 } |
| 3203 | 3210 |
| 3204 void WebGL2RenderingContextBase::uniformMatrix4fv( | 3211 void WebGL2RenderingContextBase::uniformMatrix4fv( |
| 3205 const WebGLUniformLocation* location, | 3212 const WebGLUniformLocation* location, |
| 3206 GLboolean transpose, | 3213 GLboolean transpose, |
| 3207 DOMFloat32Array* v) { | 3214 const NotShared<DOMFloat32Array>& v) { |
| 3208 WebGLRenderingContextBase::uniformMatrix4fv(location, transpose, v); | 3215 WebGLRenderingContextBase::uniformMatrix4fv(location, transpose, v); |
| 3209 } | 3216 } |
| 3210 | 3217 |
| 3211 void WebGL2RenderingContextBase::uniformMatrix4fv( | 3218 void WebGL2RenderingContextBase::uniformMatrix4fv( |
| 3212 const WebGLUniformLocation* location, | 3219 const WebGLUniformLocation* location, |
| 3213 GLboolean transpose, | 3220 GLboolean transpose, |
| 3214 Vector<GLfloat>& v) { | 3221 Vector<GLfloat>& v) { |
| 3215 WebGLRenderingContextBase::uniformMatrix4fv(location, transpose, v); | 3222 WebGLRenderingContextBase::uniformMatrix4fv(location, transpose, v); |
| 3216 } | 3223 } |
| 3217 | 3224 |
| 3218 void WebGL2RenderingContextBase::vertexAttribI4i(GLuint index, | 3225 void WebGL2RenderingContextBase::vertexAttribI4i(GLuint index, |
| 3219 GLint x, | 3226 GLint x, |
| 3220 GLint y, | 3227 GLint y, |
| 3221 GLint z, | 3228 GLint z, |
| 3222 GLint w) { | 3229 GLint w) { |
| 3223 if (isContextLost()) | 3230 if (isContextLost()) |
| 3224 return; | 3231 return; |
| 3225 contextGL()->VertexAttribI4i(index, x, y, z, w); | 3232 contextGL()->VertexAttribI4i(index, x, y, z, w); |
| 3226 setVertexAttribType(index, Int32ArrayType); | 3233 setVertexAttribType(index, Int32ArrayType); |
| 3227 } | 3234 } |
| 3228 | 3235 |
| 3229 void WebGL2RenderingContextBase::vertexAttribI4iv(GLuint index, | 3236 void WebGL2RenderingContextBase::vertexAttribI4iv( |
| 3230 const DOMInt32Array* v) { | 3237 GLuint index, |
| 3238 const NotShared<const DOMInt32Array>& v) { |
| 3231 if (isContextLost()) | 3239 if (isContextLost()) |
| 3232 return; | 3240 return; |
| 3233 if (!v || v->length() < 4) { | 3241 if (!v.view() || v.view()->length() < 4) { |
| 3234 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4iv", "invalid array"); | 3242 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4iv", "invalid array"); |
| 3235 return; | 3243 return; |
| 3236 } | 3244 } |
| 3237 contextGL()->VertexAttribI4iv(index, v->data()); | 3245 contextGL()->VertexAttribI4iv(index, v.view()->data()); |
| 3238 setVertexAttribType(index, Int32ArrayType); | 3246 setVertexAttribType(index, Int32ArrayType); |
| 3239 } | 3247 } |
| 3240 | 3248 |
| 3241 void WebGL2RenderingContextBase::vertexAttribI4iv(GLuint index, | 3249 void WebGL2RenderingContextBase::vertexAttribI4iv(GLuint index, |
| 3242 const Vector<GLint>& v) { | 3250 const Vector<GLint>& v) { |
| 3243 if (isContextLost()) | 3251 if (isContextLost()) |
| 3244 return; | 3252 return; |
| 3245 if (v.size() < 4) { | 3253 if (v.size() < 4) { |
| 3246 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4iv", "invalid array"); | 3254 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4iv", "invalid array"); |
| 3247 return; | 3255 return; |
| 3248 } | 3256 } |
| 3249 contextGL()->VertexAttribI4iv(index, v.data()); | 3257 contextGL()->VertexAttribI4iv(index, v.data()); |
| 3250 setVertexAttribType(index, Int32ArrayType); | 3258 setVertexAttribType(index, Int32ArrayType); |
| 3251 } | 3259 } |
| 3252 | 3260 |
| 3253 void WebGL2RenderingContextBase::vertexAttribI4ui(GLuint index, | 3261 void WebGL2RenderingContextBase::vertexAttribI4ui(GLuint index, |
| 3254 GLuint x, | 3262 GLuint x, |
| 3255 GLuint y, | 3263 GLuint y, |
| 3256 GLuint z, | 3264 GLuint z, |
| 3257 GLuint w) { | 3265 GLuint w) { |
| 3258 if (isContextLost()) | 3266 if (isContextLost()) |
| 3259 return; | 3267 return; |
| 3260 contextGL()->VertexAttribI4ui(index, x, y, z, w); | 3268 contextGL()->VertexAttribI4ui(index, x, y, z, w); |
| 3261 setVertexAttribType(index, Uint32ArrayType); | 3269 setVertexAttribType(index, Uint32ArrayType); |
| 3262 } | 3270 } |
| 3263 | 3271 |
| 3264 void WebGL2RenderingContextBase::vertexAttribI4uiv(GLuint index, | 3272 void WebGL2RenderingContextBase::vertexAttribI4uiv( |
| 3265 const DOMUint32Array* v) { | 3273 GLuint index, |
| 3274 const NotShared<const DOMUint32Array>& v) { |
| 3266 if (isContextLost()) | 3275 if (isContextLost()) |
| 3267 return; | 3276 return; |
| 3268 if (!v || v->length() < 4) { | 3277 if (!v.view() || v.view()->length() < 4) { |
| 3269 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4uiv", "invalid array"); | 3278 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4uiv", "invalid array"); |
| 3270 return; | 3279 return; |
| 3271 } | 3280 } |
| 3272 contextGL()->VertexAttribI4uiv(index, v->data()); | 3281 contextGL()->VertexAttribI4uiv(index, v.view()->data()); |
| 3273 setVertexAttribType(index, Uint32ArrayType); | 3282 setVertexAttribType(index, Uint32ArrayType); |
| 3274 } | 3283 } |
| 3275 | 3284 |
| 3276 void WebGL2RenderingContextBase::vertexAttribI4uiv(GLuint index, | 3285 void WebGL2RenderingContextBase::vertexAttribI4uiv(GLuint index, |
| 3277 const Vector<GLuint>& v) { | 3286 const Vector<GLuint>& v) { |
| 3278 if (isContextLost()) | 3287 if (isContextLost()) |
| 3279 return; | 3288 return; |
| 3280 if (v.size() < 4) { | 3289 if (v.size() < 4) { |
| 3281 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4uiv", "invalid array"); | 3290 synthesizeGLError(GL_INVALID_VALUE, "vertexAttribI4uiv", "invalid array"); |
| 3282 return; | 3291 return; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3475 | 3484 |
| 3476 WebGLTexture* WebGL2RenderingContextBase::validateTexImageBinding( | 3485 WebGLTexture* WebGL2RenderingContextBase::validateTexImageBinding( |
| 3477 const char* funcName, | 3486 const char* funcName, |
| 3478 TexImageFunctionID functionID, | 3487 TexImageFunctionID functionID, |
| 3479 GLenum target) { | 3488 GLenum target) { |
| 3480 if (functionID == TexImage3D || functionID == TexSubImage3D) | 3489 if (functionID == TexImage3D || functionID == TexSubImage3D) |
| 3481 return validateTexture3DBinding(funcName, target); | 3490 return validateTexture3DBinding(funcName, target); |
| 3482 return validateTexture2DBinding(funcName, target); | 3491 return validateTexture2DBinding(funcName, target); |
| 3483 } | 3492 } |
| 3484 | 3493 |
| 3485 void WebGL2RenderingContextBase::clearBufferiv(GLenum buffer, | 3494 void WebGL2RenderingContextBase::clearBufferiv( |
| 3486 GLint drawbuffer, | 3495 GLenum buffer, |
| 3487 DOMInt32Array* value) { | 3496 GLint drawbuffer, |
| 3497 const NotShared<DOMInt32Array>& value) { |
| 3488 if (isContextLost() || | 3498 if (isContextLost() || |
| 3489 !validateClearBuffer("clearBufferiv", buffer, value->length())) | 3499 !validateClearBuffer("clearBufferiv", buffer, value.view()->length())) |
| 3490 return; | 3500 return; |
| 3491 | 3501 |
| 3492 contextGL()->ClearBufferiv(buffer, drawbuffer, value->data()); | 3502 contextGL()->ClearBufferiv(buffer, drawbuffer, value.view()->data()); |
| 3493 } | 3503 } |
| 3494 | 3504 |
| 3495 void WebGL2RenderingContextBase::clearBufferiv(GLenum buffer, | 3505 void WebGL2RenderingContextBase::clearBufferiv(GLenum buffer, |
| 3496 GLint drawbuffer, | 3506 GLint drawbuffer, |
| 3497 const Vector<GLint>& value) { | 3507 const Vector<GLint>& value) { |
| 3498 if (isContextLost() || | 3508 if (isContextLost() || |
| 3499 !validateClearBuffer("clearBufferiv", buffer, value.size())) | 3509 !validateClearBuffer("clearBufferiv", buffer, value.size())) |
| 3500 return; | 3510 return; |
| 3501 | 3511 |
| 3502 contextGL()->ClearBufferiv(buffer, drawbuffer, value.data()); | 3512 contextGL()->ClearBufferiv(buffer, drawbuffer, value.data()); |
| 3503 } | 3513 } |
| 3504 | 3514 |
| 3505 void WebGL2RenderingContextBase::clearBufferuiv(GLenum buffer, | 3515 void WebGL2RenderingContextBase::clearBufferuiv( |
| 3506 GLint drawbuffer, | 3516 GLenum buffer, |
| 3507 DOMUint32Array* value) { | 3517 GLint drawbuffer, |
| 3518 const NotShared<DOMUint32Array>& value) { |
| 3508 if (isContextLost() || | 3519 if (isContextLost() || |
| 3509 !validateClearBuffer("clearBufferuiv", buffer, value->length())) | 3520 !validateClearBuffer("clearBufferuiv", buffer, value.view()->length())) |
| 3510 return; | 3521 return; |
| 3511 | 3522 |
| 3512 contextGL()->ClearBufferuiv(buffer, drawbuffer, value->data()); | 3523 contextGL()->ClearBufferuiv(buffer, drawbuffer, value.view()->data()); |
| 3513 } | 3524 } |
| 3514 | 3525 |
| 3515 void WebGL2RenderingContextBase::clearBufferuiv(GLenum buffer, | 3526 void WebGL2RenderingContextBase::clearBufferuiv(GLenum buffer, |
| 3516 GLint drawbuffer, | 3527 GLint drawbuffer, |
| 3517 const Vector<GLuint>& value) { | 3528 const Vector<GLuint>& value) { |
| 3518 if (isContextLost() || | 3529 if (isContextLost() || |
| 3519 !validateClearBuffer("clearBufferuiv", buffer, value.size())) | 3530 !validateClearBuffer("clearBufferuiv", buffer, value.size())) |
| 3520 return; | 3531 return; |
| 3521 | 3532 |
| 3522 contextGL()->ClearBufferuiv(buffer, drawbuffer, value.data()); | 3533 contextGL()->ClearBufferuiv(buffer, drawbuffer, value.data()); |
| 3523 } | 3534 } |
| 3524 | 3535 |
| 3525 void WebGL2RenderingContextBase::clearBufferfv(GLenum buffer, | 3536 void WebGL2RenderingContextBase::clearBufferfv( |
| 3526 GLint drawbuffer, | 3537 GLenum buffer, |
| 3527 DOMFloat32Array* value) { | 3538 GLint drawbuffer, |
| 3539 const NotShared<DOMFloat32Array>& value) { |
| 3528 if (isContextLost() || | 3540 if (isContextLost() || |
| 3529 !validateClearBuffer("clearBufferfv", buffer, value->length())) | 3541 !validateClearBuffer("clearBufferfv", buffer, value.view()->length())) |
| 3530 return; | 3542 return; |
| 3531 | 3543 |
| 3532 contextGL()->ClearBufferfv(buffer, drawbuffer, value->data()); | 3544 contextGL()->ClearBufferfv(buffer, drawbuffer, value.view()->data()); |
| 3533 } | 3545 } |
| 3534 | 3546 |
| 3535 void WebGL2RenderingContextBase::clearBufferfv(GLenum buffer, | 3547 void WebGL2RenderingContextBase::clearBufferfv(GLenum buffer, |
| 3536 GLint drawbuffer, | 3548 GLint drawbuffer, |
| 3537 const Vector<GLfloat>& value) { | 3549 const Vector<GLfloat>& value) { |
| 3538 if (isContextLost() || | 3550 if (isContextLost() || |
| 3539 !validateClearBuffer("clearBufferfv", buffer, value.size())) | 3551 !validateClearBuffer("clearBufferfv", buffer, value.size())) |
| 3540 return; | 3552 return; |
| 3541 | 3553 |
| 3542 contextGL()->ClearBufferfv(buffer, drawbuffer, value.data()); | 3554 contextGL()->ClearBufferfv(buffer, drawbuffer, value.data()); |
| (...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5667 | 5679 |
| 5668 void WebGL2RenderingContextBase:: | 5680 void WebGL2RenderingContextBase:: |
| 5669 DrawingBufferClientRestorePixelUnpackBufferBinding() { | 5681 DrawingBufferClientRestorePixelUnpackBufferBinding() { |
| 5670 if (!contextGL()) | 5682 if (!contextGL()) |
| 5671 return; | 5683 return; |
| 5672 contextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, | 5684 contextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, |
| 5673 objectOrZero(m_boundPixelUnpackBuffer.get())); | 5685 objectOrZero(m_boundPixelUnpackBuffer.get())); |
| 5674 } | 5686 } |
| 5675 | 5687 |
| 5676 } // namespace blink | 5688 } // namespace blink |
| OLD | NEW |