Changeset 55235 in webkit
- Timestamp:
- Feb 25, 2010, 7:06:57 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCore.pri (modified) (1 diff)
-
WebCore/WebCore.pro (modified) (1 diff)
-
WebCore/platform/graphics/GraphicsContext3D.h (modified) (4 diffs)
-
WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (added)
-
WebKit/qt/Api/qwebsettings.cpp (modified) (2 diffs)
-
WebKit/qt/Api/qwebsettings.h (modified) (1 diff)
-
WebKit/qt/ChangeLog (modified) (1 diff)
-
WebKitTools/ChangeLog (modified) (1 diff)
-
WebKitTools/QtLauncher/main.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55233 r55235 1 2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Qt WebGL support 6 7 Adds GraphicsContext3D QtWebKit implementation. 8 https://bugs.webkit.org/show_bug.cgi?id=35153 9 10 * WebCore.pri: 11 * WebCore.pro: 12 * platform/graphics/GraphicsContext3D.h: 13 * platform/graphics/qt/GraphicsContext3DQt.cpp: Added. 14 (WebCore::GraphicsContext3DInternal::isValid): 15 (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): 16 (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): 17 (WebCore::GraphicsContext3DInternal::getProcAddress): 18 (WebCore::GraphicsContext3D::create): 19 (WebCore::GraphicsContext3D::GraphicsContext3D): 20 (WebCore::GraphicsContext3D::~GraphicsContext3D): 21 (WebCore::GraphicsContext3D::platformGraphicsContext3D): 22 (WebCore::GraphicsContext3D::platformTexture): 23 (WebCore::GraphicsContext3D::makeContextCurrent): 24 (WebCore::GraphicsContext3D::beginPaint): 25 (WebCore::GraphicsContext3D::endPaint): 26 (WebCore::GraphicsContext3D::reshape): 27 (WebCore::GraphicsContext3D::activeTexture): 28 (WebCore::GraphicsContext3D::attachShader): 29 (WebCore::GraphicsContext3D::bindAttribLocation): 30 (WebCore::GraphicsContext3D::bindBuffer): 31 (WebCore::GraphicsContext3D::bindFramebuffer): 32 (WebCore::GraphicsContext3D::bindRenderbuffer): 33 (WebCore::GraphicsContext3D::bindTexture): 34 (WebCore::GraphicsContext3D::blendColor): 35 (WebCore::GraphicsContext3D::blendEquation): 36 (WebCore::GraphicsContext3D::blendEquationSeparate): 37 (WebCore::GraphicsContext3D::blendFunc): 38 (WebCore::GraphicsContext3D::blendFuncSeparate): 39 (WebCore::GraphicsContext3D::bufferData): 40 (WebCore::GraphicsContext3D::bufferSubData): 41 (WebCore::GraphicsContext3D::checkFramebufferStatus): 42 (WebCore::GraphicsContext3D::clearColor): 43 (WebCore::GraphicsContext3D::clear): 44 (WebCore::GraphicsContext3D::clearDepth): 45 (WebCore::GraphicsContext3D::clearStencil): 46 (WebCore::GraphicsContext3D::colorMask): 47 (WebCore::GraphicsContext3D::compileShader): 48 (WebCore::GraphicsContext3D::copyTexImage2D): 49 (WebCore::GraphicsContext3D::copyTexSubImage2D): 50 (WebCore::GraphicsContext3D::cullFace): 51 (WebCore::GraphicsContext3D::depthFunc): 52 (WebCore::GraphicsContext3D::depthMask): 53 (WebCore::GraphicsContext3D::depthRange): 54 (WebCore::GraphicsContext3D::detachShader): 55 (WebCore::GraphicsContext3D::disable): 56 (WebCore::GraphicsContext3D::disableVertexAttribArray): 57 (WebCore::GraphicsContext3D::drawArrays): 58 (WebCore::GraphicsContext3D::drawElements): 59 (WebCore::GraphicsContext3D::enable): 60 (WebCore::GraphicsContext3D::enableVertexAttribArray): 61 (WebCore::GraphicsContext3D::finish): 62 (WebCore::GraphicsContext3D::flush): 63 (WebCore::GraphicsContext3D::framebufferRenderbuffer): 64 (WebCore::GraphicsContext3D::framebufferTexture2D): 65 (WebCore::GraphicsContext3D::frontFace): 66 (WebCore::GraphicsContext3D::generateMipmap): 67 (WebCore::GraphicsContext3D::getActiveAttrib): 68 (WebCore::GraphicsContext3D::getActiveUniform): 69 (WebCore::GraphicsContext3D::getAttribLocation): 70 (WebCore::GraphicsContext3D::getContextAttributes): 71 (WebCore::GraphicsContext3D::getError): 72 (WebCore::GraphicsContext3D::getString): 73 (WebCore::GraphicsContext3D::hint): 74 (WebCore::GraphicsContext3D::isBuffer): 75 (WebCore::GraphicsContext3D::isEnabled): 76 (WebCore::GraphicsContext3D::isFramebuffer): 77 (WebCore::GraphicsContext3D::isProgram): 78 (WebCore::GraphicsContext3D::isRenderbuffer): 79 (WebCore::GraphicsContext3D::isShader): 80 (WebCore::GraphicsContext3D::isTexture): 81 (WebCore::GraphicsContext3D::lineWidth): 82 (WebCore::GraphicsContext3D::linkProgram): 83 (WebCore::GraphicsContext3D::pixelStorei): 84 (WebCore::GraphicsContext3D::polygonOffset): 85 (WebCore::GraphicsContext3D::readPixels): 86 (WebCore::GraphicsContext3D::releaseShaderCompiler): 87 (WebCore::GraphicsContext3D::renderbufferStorage): 88 (WebCore::GraphicsContext3D::sampleCoverage): 89 (WebCore::GraphicsContext3D::scissor): 90 (WebCore::GraphicsContext3D::shaderSource): 91 (WebCore::GraphicsContext3D::stencilFunc): 92 (WebCore::GraphicsContext3D::stencilFuncSeparate): 93 (WebCore::GraphicsContext3D::stencilMask): 94 (WebCore::GraphicsContext3D::stencilMaskSeparate): 95 (WebCore::GraphicsContext3D::stencilOp): 96 (WebCore::GraphicsContext3D::stencilOpSeparate): 97 (WebCore::GraphicsContext3D::texParameterf): 98 (WebCore::GraphicsContext3D::texParameteri): 99 (WebCore::GraphicsContext3D::uniform1f): 100 (WebCore::GraphicsContext3D::uniform1fv): 101 (WebCore::GraphicsContext3D::uniform2f): 102 (WebCore::GraphicsContext3D::uniform2fv): 103 (WebCore::GraphicsContext3D::uniform3f): 104 (WebCore::GraphicsContext3D::uniform3fv): 105 (WebCore::GraphicsContext3D::uniform4f): 106 (WebCore::GraphicsContext3D::uniform4fv): 107 (WebCore::GraphicsContext3D::uniform1i): 108 (WebCore::GraphicsContext3D::uniform1iv): 109 (WebCore::GraphicsContext3D::uniform2i): 110 (WebCore::GraphicsContext3D::uniform2iv): 111 (WebCore::GraphicsContext3D::uniform3i): 112 (WebCore::GraphicsContext3D::uniform3iv): 113 (WebCore::GraphicsContext3D::uniform4i): 114 (WebCore::GraphicsContext3D::uniform4iv): 115 (WebCore::GraphicsContext3D::uniformMatrix2fv): 116 (WebCore::GraphicsContext3D::uniformMatrix3fv): 117 (WebCore::GraphicsContext3D::uniformMatrix4fv): 118 (WebCore::GraphicsContext3D::useProgram): 119 (WebCore::GraphicsContext3D::validateProgram): 120 (WebCore::GraphicsContext3D::vertexAttrib1f): 121 (WebCore::GraphicsContext3D::vertexAttrib1fv): 122 (WebCore::GraphicsContext3D::vertexAttrib2f): 123 (WebCore::GraphicsContext3D::vertexAttrib2fv): 124 (WebCore::GraphicsContext3D::vertexAttrib3f): 125 (WebCore::GraphicsContext3D::vertexAttrib3fv): 126 (WebCore::GraphicsContext3D::vertexAttrib4f): 127 (WebCore::GraphicsContext3D::vertexAttrib4fv): 128 (WebCore::GraphicsContext3D::vertexAttribPointer): 129 (WebCore::GraphicsContext3D::viewport): 130 (WebCore::GraphicsContext3D::getBooleanv): 131 (WebCore::GraphicsContext3D::getBufferParameteriv): 132 (WebCore::GraphicsContext3D::getFloatv): 133 (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): 134 (WebCore::GraphicsContext3D::getIntegerv): 135 (WebCore::GraphicsContext3D::getProgramiv): 136 (WebCore::GraphicsContext3D::getProgramInfoLog): 137 (WebCore::GraphicsContext3D::getRenderbufferParameteriv): 138 (WebCore::GraphicsContext3D::getShaderiv): 139 (WebCore::GraphicsContext3D::getShaderInfoLog): 140 (WebCore::GraphicsContext3D::getShaderSource): 141 (WebCore::GraphicsContext3D::getTexParameterfv): 142 (WebCore::GraphicsContext3D::getTexParameteriv): 143 (WebCore::GraphicsContext3D::getUniformfv): 144 (WebCore::GraphicsContext3D::getUniformiv): 145 (WebCore::GraphicsContext3D::getUniformLocation): 146 (WebCore::GraphicsContext3D::getVertexAttribfv): 147 (WebCore::GraphicsContext3D::getVertexAttribiv): 148 (WebCore::GraphicsContext3D::getVertexAttribOffset): 149 (WebCore::GraphicsContext3D::texImage2D): 150 (WebCore::GraphicsContext3D::texSubImage2D): 151 (WebCore::GraphicsContext3D::createBuffer): 152 (WebCore::GraphicsContext3D::createFramebuffer): 153 (WebCore::GraphicsContext3D::createProgram): 154 (WebCore::GraphicsContext3D::createRenderbuffer): 155 (WebCore::GraphicsContext3D::createShader): 156 (WebCore::GraphicsContext3D::createTexture): 157 (WebCore::GraphicsContext3D::deleteBuffer): 158 (WebCore::GraphicsContext3D::deleteFramebuffer): 159 (WebCore::GraphicsContext3D::deleteProgram): 160 (WebCore::GraphicsContext3D::deleteRenderbuffer): 161 (WebCore::GraphicsContext3D::deleteShader): 162 (WebCore::GraphicsContext3D::deleteTexture): 163 (WebCore::GraphicsContext3D::sizeInBytes): 164 (WebCore::GraphicsContext3D::synthesizeGLError): 165 (WebCore::GraphicsContext3D::getImageData): 166 1 167 2010-02-25 Pavel Feldman <pfeldman@chromium.org> 2 168 -
trunk/WebCore/WebCore.pri
r55056 r55235 288 288 html/canvas/CanvasRenderingContext.idl \ 289 289 html/canvas/CanvasRenderingContext2D.idl \ 290 html/canvas/WebGLActiveInfo.idl \ 291 html/canvas/WebGLBuffer.idl \ 292 html/canvas/WebGLContextAttributes.idl \ 293 html/canvas/WebGLFramebuffer.idl \ 294 html/canvas/WebGLProgram.idl \ 295 html/canvas/WebGLRenderbuffer.idl \ 290 296 html/canvas/WebGLRenderingContext.idl \ 297 html/canvas/WebGLShader.idl \ 291 298 html/canvas/WebGLShortArray.idl \ 299 html/canvas/WebGLTexture.idl \ 300 html/canvas/WebGLUniformLocation.idl \ 292 301 html/canvas/WebGLUnsignedByteArray.idl \ 293 302 html/canvas/WebGLUnsignedIntArray.idl \ -
trunk/WebCore/WebCore.pro
r55215 r55235 2689 2689 } 2690 2690 2691 contains(DEFINES, ENABLE_3D_CANVAS=1) { 2692 QT += opengl 2693 HEADERS += \ 2694 bindings/js/JSWebGLArrayBufferConstructor.h \ 2695 bindings/js/JSWebGLArrayHelper.h \ 2696 bindings/js/JSWebGLByteArrayConstructor.h \ 2697 bindings/js/JSWebGLFloatArrayConstructor.h \ 2698 bindings/js/JSWebGLIntArrayConstructor.h \ 2699 bindings/js/JSWebGLShortArrayConstructor.h \ 2700 bindings/js/JSWebGLUnsignedByteArrayConstructor.h \ 2701 bindings/js/JSWebGLUnsignedIntArrayConstructor.h \ 2702 bindings/js/JSWebGLUnsignedShortArrayConstructor.h \ 2703 html/canvas/CanvasContextAttributes.h \ 2704 html/canvas/CanvasObject.h \ 2705 html/canvas/WebGLActiveInfo.h \ 2706 html/canvas/WebGLArrayBuffer.h \ 2707 html/canvas/WebGLArray.h \ 2708 html/canvas/WebGLBuffer.h \ 2709 html/canvas/WebGLByteArray.h \ 2710 html/canvas/WebGLContextAttributes.h \ 2711 html/canvas/WebGLFloatArray.h \ 2712 html/canvas/WebGLFramebuffer.h \ 2713 html/canvas/WebGLGetInfo.h \ 2714 html/canvas/WebGLIntArray.h \ 2715 html/canvas/WebGLProgram.h \ 2716 html/canvas/WebGLRenderbuffer.h \ 2717 html/canvas/WebGLRenderingContext.h \ 2718 html/canvas/WebGLShader.h \ 2719 html/canvas/WebGLShortArray.h \ 2720 html/canvas/WebGLTexture.h \ 2721 html/canvas/WebGLUniformLocation.h \ 2722 html/canvas/WebGLUnsignedByteArray.h \ 2723 html/canvas/WebGLUnsignedIntArray.h \ 2724 html/canvas/WebGLUnsignedShortArray.h \ 2725 platform/graphics/GraphicsContext3D.h 2726 2727 SOURCES += \ 2728 bindings/js/JSWebGLArrayBufferConstructor.cpp \ 2729 bindings/js/JSWebGLArrayCustom.cpp \ 2730 bindings/js/JSWebGLByteArrayConstructor.cpp \ 2731 bindings/js/JSWebGLByteArrayCustom.cpp \ 2732 bindings/js/JSWebGLFloatArrayConstructor.cpp \ 2733 bindings/js/JSWebGLFloatArrayCustom.cpp \ 2734 bindings/js/JSWebGLIntArrayConstructor.cpp \ 2735 bindings/js/JSWebGLIntArrayCustom.cpp \ 2736 bindings/js/JSWebGLRenderingContextCustom.cpp \ 2737 bindings/js/JSWebGLShortArrayConstructor.cpp \ 2738 bindings/js/JSWebGLShortArrayCustom.cpp \ 2739 bindings/js/JSWebGLUnsignedByteArrayConstructor.cpp \ 2740 bindings/js/JSWebGLUnsignedByteArrayCustom.cpp \ 2741 bindings/js/JSWebGLUnsignedIntArrayConstructor.cpp \ 2742 bindings/js/JSWebGLUnsignedIntArrayCustom.cpp \ 2743 bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp \ 2744 bindings/js/JSWebGLUnsignedShortArrayCustom.cpp \ 2745 html/canvas/CanvasContextAttributes.cpp \ 2746 html/canvas/CanvasObject.cpp \ 2747 html/canvas/WebGLArrayBuffer.cpp \ 2748 html/canvas/WebGLArray.cpp \ 2749 html/canvas/WebGLBuffer.cpp \ 2750 html/canvas/WebGLByteArray.cpp \ 2751 html/canvas/WebGLContextAttributes.cpp \ 2752 html/canvas/WebGLFloatArray.cpp \ 2753 html/canvas/WebGLFramebuffer.cpp \ 2754 html/canvas/WebGLGetInfo.cpp \ 2755 html/canvas/WebGLIntArray.cpp \ 2756 html/canvas/WebGLProgram.cpp \ 2757 html/canvas/WebGLRenderbuffer.cpp \ 2758 html/canvas/WebGLRenderingContext.cpp \ 2759 html/canvas/WebGLShader.cpp \ 2760 html/canvas/WebGLShortArray.cpp \ 2761 html/canvas/WebGLTexture.cpp \ 2762 html/canvas/WebGLUniformLocation.cpp \ 2763 html/canvas/WebGLUnsignedByteArray.cpp \ 2764 html/canvas/WebGLUnsignedIntArray.cpp \ 2765 html/canvas/WebGLUnsignedShortArray.cpp \ 2766 platform/graphics/GraphicsContext3D.cpp \ 2767 platform/graphics/qt/GraphicsContext3DQt.cpp \ 2768 2769 } 2770 2771 2691 2772 include($$PWD/../WebKit/qt/Api/headers.pri) 2692 2773 include(../include/QtWebKit/classheaders.pri) -
trunk/WebCore/platform/graphics/GraphicsContext3D.h
r54907 r55235 45 45 typedef GLuint Platform3DObject; 46 46 const Platform3DObject NullPlatform3DObject = 0; 47 #elif PLATFORM(QT) 48 #include <QtOpenGL/QtOpenGL> 49 50 typedef void* PlatformGraphicsContext3D; 51 const PlatformGraphicsContext3D NullPlatformGraphicsContext3D = 0; 52 typedef int Platform3DObject; 53 const Platform3DObject NullPlatform3DObject = 0; 47 54 #else 48 55 typedef void* PlatformGraphicsContext3D; … … 74 81 75 82 // FIXME: ideally this would be used on all platforms. 76 #if PLATFORM(CHROMIUM) 83 #if PLATFORM(CHROMIUM) || PLATFORM(QT) 77 84 class GraphicsContext3DInternal; 78 85 #endif … … 410 417 PlatformGraphicsContext3D platformGraphicsContext3D() const; 411 418 Platform3DObject platformTexture() const; 419 #elif PLATFORM(QT) 420 PlatformGraphicsContext3D platformGraphicsContext3D(); 421 Platform3DObject platformTexture() const; 412 422 #else 413 423 PlatformGraphicsContext3D platformGraphicsContext3D() const { return NullPlatformGraphicsContext3D; } … … 705 715 706 716 // FIXME: ideally this would be used on all platforms. 707 #if PLATFORM(CHROMIUM) 717 #if PLATFORM(CHROMIUM) || PLATFORM(QT) 708 718 friend class GraphicsContext3DInternal; 709 719 OwnPtr<GraphicsContext3DInternal> m_internal; -
trunk/WebKit/qt/Api/qwebsettings.cpp
r54873 r55235 159 159 settings->setAcceleratedCompositingEnabled(value); 160 160 #endif 161 #if ENABLE(3D_CANVAS) 162 value = attributes.value(QWebSettings::WebGLEnabled, 163 global->attributes.value(QWebSettings::WebGLEnabled)); 164 165 settings->setWebGLEnabled(value); 166 #endif 167 161 168 value = attributes.value(QWebSettings::JavascriptCanOpenWindows, 162 169 global->attributes.value(QWebSettings::JavascriptCanOpenWindows)); … … 402 409 d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true); 403 410 d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, false); 411 d->attributes.insert(QWebSettings::WebGLEnabled, false); 404 412 d->offlineStorageDefaultQuota = 5 * 1024 * 1024; 405 413 d->defaultTextEncoding = QLatin1String("iso-8859-1"); -
trunk/WebKit/qt/Api/qwebsettings.h
r54873 r55235 71 71 DnsPrefetchEnabled, 72 72 XSSAuditorEnabled, 73 AcceleratedCompositingEnabled 73 AcceleratedCompositingEnabled, 74 WebGLEnabled 74 75 }; 75 76 enum WebGraphic { -
trunk/WebKit/qt/ChangeLog
r55192 r55235 1 2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Qt WebGL support 6 7 Adds enabling and disabling of WebGL support to QWebSettings. 8 https://bugs.webkit.org/show_bug.cgi?id=35153 9 10 * Api/qwebsettings.cpp: 11 (QWebSettingsPrivate::apply): 12 (QWebSettings::QWebSettings): 13 * Api/qwebsettings.h: 14 1 15 2010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 16 -
trunk/WebKitTools/ChangeLog
r55230 r55235 1 2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Qt WebGL support 6 7 Adds toggling of WebGL support to QtLauncher. 8 https://bugs.webkit.org/show_bug.cgi?id=35153 9 10 * QtLauncher/main.cpp: 11 (LauncherWindow::toggleWebGL): 12 (LauncherWindow::setupUI): 13 1 14 2010-02-25 Ben Murdoch <benm@google.com> 2 15 -
trunk/WebKitTools/QtLauncher/main.cpp
r55164 r55235 118 118 void setTouchMocking(bool on); 119 119 void toggleAcceleratedCompositing(bool toggle); 120 void toggleWebGL(bool toggle); 120 121 void initializeView(bool useGraphicsView = false); 121 122 … … 464 465 } 465 466 467 void LauncherWindow::toggleWebGL(bool toggle) 468 { 469 page()->settings()->setAttribute(QWebSettings::WebGLEnabled, toggle); 470 } 471 466 472 void LauncherWindow::initializeView(bool useGraphicsView) 467 473 { … … 581 587 toggleGraphicsView->setChecked(false); 582 588 589 QAction* toggleWebGL = toolsMenu->addAction("Toggle WebGL", this, SLOT(toggleWebGL(bool))); 590 toggleWebGL->setCheckable(true); 591 toggleWebGL->setChecked(false); 592 583 593 QAction* toggleAcceleratedCompositing = graphicsViewMenu->addAction("Toggle Accelerated Compositing", this, SLOT(toggleAcceleratedCompositing(bool))); 584 594 toggleAcceleratedCompositing->setCheckable(true);
Note:
See TracChangeset
for help on using the changeset viewer.