Changeset 65761 in webkit
- Timestamp:
- Aug 20, 2010 4:23:25 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r65760 r65761 1 2010-08-20 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Ariya Hidayat. 4 5 [Qt] WebKit does not compile with --3d-canvas 6 https://bugs.webkit.org/show_bug.cgi?id=44335 7 8 - PlatformGLObject => Platform3DObject 9 - Implemented getAttachedShaders() 10 - Implemented bufferData() and bufferSubData() for ArrayBuffer* 11 - Removed reference to nonexistent variable in getImageData() 12 13 * platform/graphics/qt/GraphicsContext3DQt.cpp: 14 (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): 15 (WebCore::GraphicsContext3D::attachShader): 16 (WebCore::GraphicsContext3D::getAttachedShaders): 17 (WebCore::GraphicsContext3D::bindAttribLocation): 18 (WebCore::GraphicsContext3D::bindBuffer): 19 (WebCore::GraphicsContext3D::bindFramebuffer): 20 (WebCore::GraphicsContext3D::bindRenderbuffer): 21 (WebCore::GraphicsContext3D::bindTexture): 22 (WebCore::GraphicsContext3D::bufferData): 23 (WebCore::GraphicsContext3D::bufferSubData): 24 (WebCore::GraphicsContext3D::compileShader): 25 (WebCore::GraphicsContext3D::detachShader): 26 (WebCore::GraphicsContext3D::framebufferRenderbuffer): 27 (WebCore::GraphicsContext3D::framebufferTexture2D): 28 (WebCore::GraphicsContext3D::getActiveAttrib): 29 (WebCore::GraphicsContext3D::getActiveUniform): 30 (WebCore::GraphicsContext3D::getAttribLocation): 31 (WebCore::GraphicsContext3D::isBuffer): 32 (WebCore::GraphicsContext3D::isFramebuffer): 33 (WebCore::GraphicsContext3D::isProgram): 34 (WebCore::GraphicsContext3D::isRenderbuffer): 35 (WebCore::GraphicsContext3D::isShader): 36 (WebCore::GraphicsContext3D::isTexture): 37 (WebCore::GraphicsContext3D::linkProgram): 38 (WebCore::GraphicsContext3D::shaderSource): 39 (WebCore::GraphicsContext3D::useProgram): 40 (WebCore::GraphicsContext3D::validateProgram): 41 (WebCore::GraphicsContext3D::getProgramiv): 42 (WebCore::GraphicsContext3D::getProgramInfoLog): 43 (WebCore::GraphicsContext3D::getShaderiv): 44 (WebCore::GraphicsContext3D::getShaderInfoLog): 45 (WebCore::GraphicsContext3D::getShaderSource): 46 (WebCore::GraphicsContext3D::getUniformfv): 47 (WebCore::GraphicsContext3D::getUniformiv): 48 (WebCore::GraphicsContext3D::getUniformLocation): 49 (WebCore::GraphicsContext3D::getImageData): 50 * platform/graphics/qt/GraphicsLayerQt.h: 51 1 52 2010-08-20 Dan Bernstein <mitz@apple.com> 2 53 -
trunk/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r65449 r65761 90 90 typedef void (APIENTRY* glGetActiveAttribType) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*); 91 91 typedef void (APIENTRY* glGetActiveUniformType) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*); 92 typedef void (APIENTRY* glGetAttachedShadersType) (GLuint, GLsizei, GLsizei*, GLuint*); 92 93 typedef GLint (APIENTRY* glGetAttribLocationType) (GLuint, const char*); 93 94 typedef void (APIENTRY* glGetBufferParameterivType) (GLenum, GLenum, GLint*); … … 188 189 glGetActiveAttribType getActiveAttrib; 189 190 glGetActiveUniformType getActiveUniform; 191 glGetAttachedShadersType getAttachedShaders; 190 192 glGetAttribLocationType getAttribLocation; 191 193 glGetBufferParameterivType getBufferParameteriv; … … 350 352 getActiveAttrib = GET_PROC_ADDRESS(glGetActiveAttrib); 351 353 getActiveUniform = GET_PROC_ADDRESS(glGetActiveUniform); 354 getAttachedShaders = GET_PROC_ADDRESS(glGetAttachedShaders); 352 355 getAttribLocation = GET_PROC_ADDRESS(glGetAttribLocation); 353 356 getBufferParameteriv = GET_PROC_ADDRESS(glGetBufferParameteriv); … … 583 586 } 584 587 585 void GraphicsContext3D::attachShader(Platform GLObject program, PlatformGLObject shader)588 void GraphicsContext3D::attachShader(Platform3DObject program, Platform3DObject shader) 586 589 { 587 590 ASSERT(program); … … 591 594 } 592 595 593 void GraphicsContext3D::bindAttribLocation(PlatformGLObject program, unsigned long index, const String& name) 596 void GraphicsContext3D::getAttachedShaders(Platform3DObject program, int maxCount, int* count, unsigned int* shaders) 597 { 598 if (!program) { 599 synthesizeGLError(INVALID_VALUE); 600 return; 601 } 602 603 m_internal->m_glWidget->makeCurrent(); 604 getAttachedShaders((GLuint) program, maxCount, count, shaders); 605 } 606 607 void GraphicsContext3D::bindAttribLocation(Platform3DObject program, unsigned long index, const String& name) 594 608 { 595 609 ASSERT(program); … … 598 612 } 599 613 600 void GraphicsContext3D::bindBuffer(unsigned long target, Platform GLObject buffer)601 { 602 m_internal->m_glWidget->makeCurrent(); 603 m_internal->bindBuffer(target, (GLuint) buffer ->object());604 } 605 606 void GraphicsContext3D::bindFramebuffer(unsigned long target, Platform GLObject buffer)614 void GraphicsContext3D::bindBuffer(unsigned long target, Platform3DObject buffer) 615 { 616 m_internal->m_glWidget->makeCurrent(); 617 m_internal->bindBuffer(target, (GLuint) buffer); 618 } 619 620 void GraphicsContext3D::bindFramebuffer(unsigned long target, Platform3DObject buffer) 607 621 { 608 622 m_internal->m_glWidget->makeCurrent(); … … 611 625 } 612 626 613 void GraphicsContext3D::bindRenderbuffer(unsigned long target, Platform GLObject renderbuffer)627 void GraphicsContext3D::bindRenderbuffer(unsigned long target, Platform3DObject renderbuffer) 614 628 { 615 629 m_internal->m_glWidget->makeCurrent(); … … 617 631 } 618 632 619 void GraphicsContext3D::bindTexture(unsigned long target, Platform GLObject texture)633 void GraphicsContext3D::bindTexture(unsigned long target, Platform3DObject texture) 620 634 { 621 635 m_internal->m_glWidget->makeCurrent(); … … 657 671 m_internal->m_glWidget->makeCurrent(); 658 672 m_internal->bufferData(target, size, /* data */ 0, usage); 673 } 674 675 void GraphicsContext3D::bufferData(unsigned long target, ArrayBuffer* array, unsigned long usage) 676 { 677 if (!array || !array->byteLength()) 678 return; 679 680 m_internal->m_glWidget->makeCurrent(); 681 m_internal->bufferData(target, array->byteLength(), array->data(), usage); 659 682 } 660 683 … … 666 689 m_internal->m_glWidget->makeCurrent(); 667 690 m_internal->bufferData(target, array->byteLength(), array->baseAddress(), usage); 691 } 692 693 void GraphicsContext3D::bufferSubData(unsigned long target, long offset, ArrayBuffer* array) 694 { 695 if (!array || !array->byteLength()) 696 return; 697 698 m_internal->m_glWidget->makeCurrent(); 699 m_internal->bufferSubData(target, offset, array->byteLength(), array->data()); 668 700 } 669 701 … … 717 749 } 718 750 719 void GraphicsContext3D::compileShader(Platform GLObject shader)751 void GraphicsContext3D::compileShader(Platform3DObject shader) 720 752 { 721 753 ASSERT(shader); … … 764 796 } 765 797 766 void GraphicsContext3D::detachShader(Platform GLObject program, PlatformGLObject shader)798 void GraphicsContext3D::detachShader(Platform3DObject program, Platform3DObject shader) 767 799 { 768 800 ASSERT(program); … … 820 852 } 821 853 822 void GraphicsContext3D::framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, Platform GLObject buffer)854 void GraphicsContext3D::framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, Platform3DObject buffer) 823 855 { 824 856 m_internal->m_glWidget->makeCurrent(); … … 826 858 } 827 859 828 void GraphicsContext3D::framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, Platform GLObject texture, long level)860 void GraphicsContext3D::framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, Platform3DObject texture, long level) 829 861 { 830 862 m_internal->m_glWidget->makeCurrent(); … … 844 876 } 845 877 846 bool GraphicsContext3D::getActiveAttrib(Platform GLObject program, unsigned long index, ActiveInfo& info)878 bool GraphicsContext3D::getActiveAttrib(Platform3DObject program, unsigned long index, ActiveInfo& info) 847 879 { 848 880 if (!program) { … … 876 908 } 877 909 878 bool GraphicsContext3D::getActiveUniform(Platform GLObject program, unsigned long index, ActiveInfo& info)910 bool GraphicsContext3D::getActiveUniform(Platform3DObject program, unsigned long index, ActiveInfo& info) 879 911 { 880 912 if (!program) { … … 908 940 } 909 941 910 int GraphicsContext3D::getAttribLocation(Platform GLObject program, const String& name)942 int GraphicsContext3D::getAttribLocation(Platform3DObject program, const String& name) 911 943 { 912 944 if (!program) … … 947 979 } 948 980 949 bool GraphicsContext3D::isBuffer(Platform GLObject buffer)981 bool GraphicsContext3D::isBuffer(Platform3DObject buffer) 950 982 { 951 983 if (!buffer) … … 962 994 } 963 995 964 bool GraphicsContext3D::isFramebuffer(Platform GLObject framebuffer)996 bool GraphicsContext3D::isFramebuffer(Platform3DObject framebuffer) 965 997 { 966 998 if (!framebuffer) … … 971 1003 } 972 1004 973 bool GraphicsContext3D::isProgram(Platform GLObject program)1005 bool GraphicsContext3D::isProgram(Platform3DObject program) 974 1006 { 975 1007 if (!program) … … 980 1012 } 981 1013 982 bool GraphicsContext3D::isRenderbuffer(Platform GLObject renderbuffer)1014 bool GraphicsContext3D::isRenderbuffer(Platform3DObject renderbuffer) 983 1015 { 984 1016 if (!renderbuffer) … … 989 1021 } 990 1022 991 bool GraphicsContext3D::isShader(Platform GLObject shader)1023 bool GraphicsContext3D::isShader(Platform3DObject shader) 992 1024 { 993 1025 if (!shader) … … 998 1030 } 999 1031 1000 bool GraphicsContext3D::isTexture(Platform GLObject texture)1032 bool GraphicsContext3D::isTexture(Platform3DObject texture) 1001 1033 { 1002 1034 if (!texture) … … 1013 1045 } 1014 1046 1015 void GraphicsContext3D::linkProgram(Platform GLObject program)1047 void GraphicsContext3D::linkProgram(Platform3DObject program) 1016 1048 { 1017 1049 ASSERT(program); … … 1066 1098 } 1067 1099 1068 void GraphicsContext3D::shaderSource(Platform GLObject shader, const String& source)1100 void GraphicsContext3D::shaderSource(Platform3DObject shader, const String& source) 1069 1101 { 1070 1102 ASSERT(shader); … … 1248 1280 } 1249 1281 1250 void GraphicsContext3D::useProgram(Platform GLObject program)1282 void GraphicsContext3D::useProgram(Platform3DObject program) 1251 1283 { 1252 1284 ASSERT(program); … … 1256 1288 } 1257 1289 1258 void GraphicsContext3D::validateProgram(Platform GLObject program)1290 void GraphicsContext3D::validateProgram(Platform3DObject program) 1259 1291 { 1260 1292 ASSERT(program); … … 1354 1386 } 1355 1387 1356 void GraphicsContext3D::getProgramiv(Platform GLObject program, unsigned long paramName, int* value)1388 void GraphicsContext3D::getProgramiv(Platform3DObject program, unsigned long paramName, int* value) 1357 1389 { 1358 1390 m_internal->m_glWidget->makeCurrent(); … … 1360 1392 } 1361 1393 1362 String GraphicsContext3D::getProgramInfoLog(Platform GLObject program)1394 String GraphicsContext3D::getProgramInfoLog(Platform3DObject program) 1363 1395 { 1364 1396 m_internal->m_glWidget->makeCurrent(); … … 1387 1419 } 1388 1420 1389 void GraphicsContext3D::getShaderiv(Platform GLObject shader, unsigned long paramName, int* value)1421 void GraphicsContext3D::getShaderiv(Platform3DObject shader, unsigned long paramName, int* value) 1390 1422 { 1391 1423 ASSERT(shader); … … 1394 1426 } 1395 1427 1396 String GraphicsContext3D::getShaderInfoLog(Platform GLObject shader)1428 String GraphicsContext3D::getShaderInfoLog(Platform3DObject shader) 1397 1429 { 1398 1430 m_internal->m_glWidget->makeCurrent(); … … 1414 1446 } 1415 1447 1416 String GraphicsContext3D::getShaderSource(Platform GLObject shader)1448 String GraphicsContext3D::getShaderSource(Platform3DObject shader) 1417 1449 { 1418 1450 m_internal->m_glWidget->makeCurrent(); … … 1446 1478 } 1447 1479 1448 void GraphicsContext3D::getUniformfv(Platform GLObject program, long location, float* value)1480 void GraphicsContext3D::getUniformfv(Platform3DObject program, long location, float* value) 1449 1481 { 1450 1482 m_internal->m_glWidget->makeCurrent(); … … 1452 1484 } 1453 1485 1454 void GraphicsContext3D::getUniformiv(Platform GLObject program, long location, int* value)1486 void GraphicsContext3D::getUniformiv(Platform3DObject program, long location, int* value) 1455 1487 { 1456 1488 m_internal->m_glWidget->makeCurrent(); … … 1458 1490 } 1459 1491 1460 long GraphicsContext3D::getUniformLocation(Platform GLObject program, const String& name)1492 long GraphicsContext3D::getUniformLocation(Platform3DObject program, const String& name) 1461 1493 { 1462 1494 ASSERT(program); … … 1622 1654 1623 1655 AlphaOp neededAlphaOp = kAlphaDoNothing; 1624 if (!premultiplyAlpha && *hasAlphaChannel)1656 if (!premultiplyAlpha) 1625 1657 // FIXME: must fetch the image data before the premultiplication step 1626 1658 neededAlphaOp = kAlphaDoUnmultiply; -
trunk/WebCore/platform/graphics/qt/GraphicsLayerQt.h
r63001 r65761 21 21 #define GraphicsLayerQt_h 22 22 23 #if ENABLE(3D_CANVAS) 24 #include "GraphicsContext3D.h" 25 #endif 23 26 #include "GraphicsLayer.h" 24 27 #include "GraphicsLayerClient.h"
Note: See TracChangeset
for help on using the changeset viewer.