Commit 17dee22d authored by eric@webkit.org's avatar eric@webkit.org

2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com>

        Reviewed by Kenneth Rohde Christiansen.

        Qt WebGL support

        Adds GraphicsContext3D QtWebKit implementation.
        https://bugs.webkit.org/show_bug.cgi?id=35153

        * WebCore.pri:
        * WebCore.pro:
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/qt/GraphicsContext3DQt.cpp: Added.
        (WebCore::GraphicsContext3DInternal::isValid):
        (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
        (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
        (WebCore::GraphicsContext3DInternal::getProcAddress):
        (WebCore::GraphicsContext3D::create):
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        (WebCore::GraphicsContext3D::platformGraphicsContext3D):
        (WebCore::GraphicsContext3D::platformTexture):
        (WebCore::GraphicsContext3D::makeContextCurrent):
        (WebCore::GraphicsContext3D::beginPaint):
        (WebCore::GraphicsContext3D::endPaint):
        (WebCore::GraphicsContext3D::reshape):
        (WebCore::GraphicsContext3D::activeTexture):
        (WebCore::GraphicsContext3D::attachShader):
        (WebCore::GraphicsContext3D::bindAttribLocation):
        (WebCore::GraphicsContext3D::bindBuffer):
        (WebCore::GraphicsContext3D::bindFramebuffer):
        (WebCore::GraphicsContext3D::bindRenderbuffer):
        (WebCore::GraphicsContext3D::bindTexture):
        (WebCore::GraphicsContext3D::blendColor):
        (WebCore::GraphicsContext3D::blendEquation):
        (WebCore::GraphicsContext3D::blendEquationSeparate):
        (WebCore::GraphicsContext3D::blendFunc):
        (WebCore::GraphicsContext3D::blendFuncSeparate):
        (WebCore::GraphicsContext3D::bufferData):
        (WebCore::GraphicsContext3D::bufferSubData):
        (WebCore::GraphicsContext3D::checkFramebufferStatus):
        (WebCore::GraphicsContext3D::clearColor):
        (WebCore::GraphicsContext3D::clear):
        (WebCore::GraphicsContext3D::clearDepth):
        (WebCore::GraphicsContext3D::clearStencil):
        (WebCore::GraphicsContext3D::colorMask):
        (WebCore::GraphicsContext3D::compileShader):
        (WebCore::GraphicsContext3D::copyTexImage2D):
        (WebCore::GraphicsContext3D::copyTexSubImage2D):
        (WebCore::GraphicsContext3D::cullFace):
        (WebCore::GraphicsContext3D::depthFunc):
        (WebCore::GraphicsContext3D::depthMask):
        (WebCore::GraphicsContext3D::depthRange):
        (WebCore::GraphicsContext3D::detachShader):
        (WebCore::GraphicsContext3D::disable):
        (WebCore::GraphicsContext3D::disableVertexAttribArray):
        (WebCore::GraphicsContext3D::drawArrays):
        (WebCore::GraphicsContext3D::drawElements):
        (WebCore::GraphicsContext3D::enable):
        (WebCore::GraphicsContext3D::enableVertexAttribArray):
        (WebCore::GraphicsContext3D::finish):
        (WebCore::GraphicsContext3D::flush):
        (WebCore::GraphicsContext3D::framebufferRenderbuffer):
        (WebCore::GraphicsContext3D::framebufferTexture2D):
        (WebCore::GraphicsContext3D::frontFace):
        (WebCore::GraphicsContext3D::generateMipmap):
        (WebCore::GraphicsContext3D::getActiveAttrib):
        (WebCore::GraphicsContext3D::getActiveUniform):
        (WebCore::GraphicsContext3D::getAttribLocation):
        (WebCore::GraphicsContext3D::getContextAttributes):
        (WebCore::GraphicsContext3D::getError):
        (WebCore::GraphicsContext3D::getString):
        (WebCore::GraphicsContext3D::hint):
        (WebCore::GraphicsContext3D::isBuffer):
        (WebCore::GraphicsContext3D::isEnabled):
        (WebCore::GraphicsContext3D::isFramebuffer):
        (WebCore::GraphicsContext3D::isProgram):
        (WebCore::GraphicsContext3D::isRenderbuffer):
        (WebCore::GraphicsContext3D::isShader):
        (WebCore::GraphicsContext3D::isTexture):
        (WebCore::GraphicsContext3D::lineWidth):
        (WebCore::GraphicsContext3D::linkProgram):
        (WebCore::GraphicsContext3D::pixelStorei):
        (WebCore::GraphicsContext3D::polygonOffset):
        (WebCore::GraphicsContext3D::readPixels):
        (WebCore::GraphicsContext3D::releaseShaderCompiler):
        (WebCore::GraphicsContext3D::renderbufferStorage):
        (WebCore::GraphicsContext3D::sampleCoverage):
        (WebCore::GraphicsContext3D::scissor):
        (WebCore::GraphicsContext3D::shaderSource):
        (WebCore::GraphicsContext3D::stencilFunc):
        (WebCore::GraphicsContext3D::stencilFuncSeparate):
        (WebCore::GraphicsContext3D::stencilMask):
        (WebCore::GraphicsContext3D::stencilMaskSeparate):
        (WebCore::GraphicsContext3D::stencilOp):
        (WebCore::GraphicsContext3D::stencilOpSeparate):
        (WebCore::GraphicsContext3D::texParameterf):
        (WebCore::GraphicsContext3D::texParameteri):
        (WebCore::GraphicsContext3D::uniform1f):
        (WebCore::GraphicsContext3D::uniform1fv):
        (WebCore::GraphicsContext3D::uniform2f):
        (WebCore::GraphicsContext3D::uniform2fv):
        (WebCore::GraphicsContext3D::uniform3f):
        (WebCore::GraphicsContext3D::uniform3fv):
        (WebCore::GraphicsContext3D::uniform4f):
        (WebCore::GraphicsContext3D::uniform4fv):
        (WebCore::GraphicsContext3D::uniform1i):
        (WebCore::GraphicsContext3D::uniform1iv):
        (WebCore::GraphicsContext3D::uniform2i):
        (WebCore::GraphicsContext3D::uniform2iv):
        (WebCore::GraphicsContext3D::uniform3i):
        (WebCore::GraphicsContext3D::uniform3iv):
        (WebCore::GraphicsContext3D::uniform4i):
        (WebCore::GraphicsContext3D::uniform4iv):
        (WebCore::GraphicsContext3D::uniformMatrix2fv):
        (WebCore::GraphicsContext3D::uniformMatrix3fv):
        (WebCore::GraphicsContext3D::uniformMatrix4fv):
        (WebCore::GraphicsContext3D::useProgram):
        (WebCore::GraphicsContext3D::validateProgram):
        (WebCore::GraphicsContext3D::vertexAttrib1f):
        (WebCore::GraphicsContext3D::vertexAttrib1fv):
        (WebCore::GraphicsContext3D::vertexAttrib2f):
        (WebCore::GraphicsContext3D::vertexAttrib2fv):
        (WebCore::GraphicsContext3D::vertexAttrib3f):
        (WebCore::GraphicsContext3D::vertexAttrib3fv):
        (WebCore::GraphicsContext3D::vertexAttrib4f):
        (WebCore::GraphicsContext3D::vertexAttrib4fv):
        (WebCore::GraphicsContext3D::vertexAttribPointer):
        (WebCore::GraphicsContext3D::viewport):
        (WebCore::GraphicsContext3D::getBooleanv):
        (WebCore::GraphicsContext3D::getBufferParameteriv):
        (WebCore::GraphicsContext3D::getFloatv):
        (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
        (WebCore::GraphicsContext3D::getIntegerv):
        (WebCore::GraphicsContext3D::getProgramiv):
        (WebCore::GraphicsContext3D::getProgramInfoLog):
        (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
        (WebCore::GraphicsContext3D::getShaderiv):
        (WebCore::GraphicsContext3D::getShaderInfoLog):
        (WebCore::GraphicsContext3D::getShaderSource):
        (WebCore::GraphicsContext3D::getTexParameterfv):
        (WebCore::GraphicsContext3D::getTexParameteriv):
        (WebCore::GraphicsContext3D::getUniformfv):
        (WebCore::GraphicsContext3D::getUniformiv):
        (WebCore::GraphicsContext3D::getUniformLocation):
        (WebCore::GraphicsContext3D::getVertexAttribfv):
        (WebCore::GraphicsContext3D::getVertexAttribiv):
        (WebCore::GraphicsContext3D::getVertexAttribOffset):
        (WebCore::GraphicsContext3D::texImage2D):
        (WebCore::GraphicsContext3D::texSubImage2D):
        (WebCore::GraphicsContext3D::createBuffer):
        (WebCore::GraphicsContext3D::createFramebuffer):
        (WebCore::GraphicsContext3D::createProgram):
        (WebCore::GraphicsContext3D::createRenderbuffer):
        (WebCore::GraphicsContext3D::createShader):
        (WebCore::GraphicsContext3D::createTexture):
        (WebCore::GraphicsContext3D::deleteBuffer):
        (WebCore::GraphicsContext3D::deleteFramebuffer):
        (WebCore::GraphicsContext3D::deleteProgram):
        (WebCore::GraphicsContext3D::deleteRenderbuffer):
        (WebCore::GraphicsContext3D::deleteShader):
        (WebCore::GraphicsContext3D::deleteTexture):
        (WebCore::GraphicsContext3D::sizeInBytes):
        (WebCore::GraphicsContext3D::synthesizeGLError):
        (WebCore::GraphicsContext3D::getImageData):
2010-02-25  Jarkko Sakkinen  <jarkko.sakkinen@tieto.com>

        Reviewed by Kenneth Rohde Christiansen.

        Qt WebGL support

        Adds enabling and disabling of WebGL support to QWebSettings.
        https://bugs.webkit.org/show_bug.cgi?id=35153

        * Api/qwebsettings.cpp:
        (QWebSettingsPrivate::apply):
        (QWebSettings::QWebSettings):
        * Api/qwebsettings.h:
2010-02-25  Jarkko Sakkinen  <jarkko.sakkinen@tieto.com>

        Reviewed by Kenneth Rohde Christiansen.

        Qt WebGL support

        Adds toggling of WebGL support to QtLauncher.
        https://bugs.webkit.org/show_bug.cgi?id=35153

        * QtLauncher/main.cpp:
        (LauncherWindow::toggleWebGL):
        (LauncherWindow::setupUI):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 95c6e9da
2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com>
Reviewed by Kenneth Rohde Christiansen.
Qt WebGL support
Adds GraphicsContext3D QtWebKit implementation.
https://bugs.webkit.org/show_bug.cgi?id=35153
* WebCore.pri:
* WebCore.pro:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/qt/GraphicsContext3DQt.cpp: Added.
(WebCore::GraphicsContext3DInternal::isValid):
(WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
(WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
(WebCore::GraphicsContext3DInternal::getProcAddress):
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
(WebCore::GraphicsContext3D::platformTexture):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::beginPaint):
(WebCore::GraphicsContext3D::endPaint):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::activeTexture):
(WebCore::GraphicsContext3D::attachShader):
(WebCore::GraphicsContext3D::bindAttribLocation):
(WebCore::GraphicsContext3D::bindBuffer):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::bindRenderbuffer):
(WebCore::GraphicsContext3D::bindTexture):
(WebCore::GraphicsContext3D::blendColor):
(WebCore::GraphicsContext3D::blendEquation):
(WebCore::GraphicsContext3D::blendEquationSeparate):
(WebCore::GraphicsContext3D::blendFunc):
(WebCore::GraphicsContext3D::blendFuncSeparate):
(WebCore::GraphicsContext3D::bufferData):
(WebCore::GraphicsContext3D::bufferSubData):
(WebCore::GraphicsContext3D::checkFramebufferStatus):
(WebCore::GraphicsContext3D::clearColor):
(WebCore::GraphicsContext3D::clear):
(WebCore::GraphicsContext3D::clearDepth):
(WebCore::GraphicsContext3D::clearStencil):
(WebCore::GraphicsContext3D::colorMask):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::cullFace):
(WebCore::GraphicsContext3D::depthFunc):
(WebCore::GraphicsContext3D::depthMask):
(WebCore::GraphicsContext3D::depthRange):
(WebCore::GraphicsContext3D::detachShader):
(WebCore::GraphicsContext3D::disable):
(WebCore::GraphicsContext3D::disableVertexAttribArray):
(WebCore::GraphicsContext3D::drawArrays):
(WebCore::GraphicsContext3D::drawElements):
(WebCore::GraphicsContext3D::enable):
(WebCore::GraphicsContext3D::enableVertexAttribArray):
(WebCore::GraphicsContext3D::finish):
(WebCore::GraphicsContext3D::flush):
(WebCore::GraphicsContext3D::framebufferRenderbuffer):
(WebCore::GraphicsContext3D::framebufferTexture2D):
(WebCore::GraphicsContext3D::frontFace):
(WebCore::GraphicsContext3D::generateMipmap):
(WebCore::GraphicsContext3D::getActiveAttrib):
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore::GraphicsContext3D::getAttribLocation):
(WebCore::GraphicsContext3D::getContextAttributes):
(WebCore::GraphicsContext3D::getError):
(WebCore::GraphicsContext3D::getString):
(WebCore::GraphicsContext3D::hint):
(WebCore::GraphicsContext3D::isBuffer):
(WebCore::GraphicsContext3D::isEnabled):
(WebCore::GraphicsContext3D::isFramebuffer):
(WebCore::GraphicsContext3D::isProgram):
(WebCore::GraphicsContext3D::isRenderbuffer):
(WebCore::GraphicsContext3D::isShader):
(WebCore::GraphicsContext3D::isTexture):
(WebCore::GraphicsContext3D::lineWidth):
(WebCore::GraphicsContext3D::linkProgram):
(WebCore::GraphicsContext3D::pixelStorei):
(WebCore::GraphicsContext3D::polygonOffset):
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore::GraphicsContext3D::renderbufferStorage):
(WebCore::GraphicsContext3D::sampleCoverage):
(WebCore::GraphicsContext3D::scissor):
(WebCore::GraphicsContext3D::shaderSource):
(WebCore::GraphicsContext3D::stencilFunc):
(WebCore::GraphicsContext3D::stencilFuncSeparate):
(WebCore::GraphicsContext3D::stencilMask):
(WebCore::GraphicsContext3D::stencilMaskSeparate):
(WebCore::GraphicsContext3D::stencilOp):
(WebCore::GraphicsContext3D::stencilOpSeparate):
(WebCore::GraphicsContext3D::texParameterf):
(WebCore::GraphicsContext3D::texParameteri):
(WebCore::GraphicsContext3D::uniform1f):
(WebCore::GraphicsContext3D::uniform1fv):
(WebCore::GraphicsContext3D::uniform2f):
(WebCore::GraphicsContext3D::uniform2fv):
(WebCore::GraphicsContext3D::uniform3f):
(WebCore::GraphicsContext3D::uniform3fv):
(WebCore::GraphicsContext3D::uniform4f):
(WebCore::GraphicsContext3D::uniform4fv):
(WebCore::GraphicsContext3D::uniform1i):
(WebCore::GraphicsContext3D::uniform1iv):
(WebCore::GraphicsContext3D::uniform2i):
(WebCore::GraphicsContext3D::uniform2iv):
(WebCore::GraphicsContext3D::uniform3i):
(WebCore::GraphicsContext3D::uniform3iv):
(WebCore::GraphicsContext3D::uniform4i):
(WebCore::GraphicsContext3D::uniform4iv):
(WebCore::GraphicsContext3D::uniformMatrix2fv):
(WebCore::GraphicsContext3D::uniformMatrix3fv):
(WebCore::GraphicsContext3D::uniformMatrix4fv):
(WebCore::GraphicsContext3D::useProgram):
(WebCore::GraphicsContext3D::validateProgram):
(WebCore::GraphicsContext3D::vertexAttrib1f):
(WebCore::GraphicsContext3D::vertexAttrib1fv):
(WebCore::GraphicsContext3D::vertexAttrib2f):
(WebCore::GraphicsContext3D::vertexAttrib2fv):
(WebCore::GraphicsContext3D::vertexAttrib3f):
(WebCore::GraphicsContext3D::vertexAttrib3fv):
(WebCore::GraphicsContext3D::vertexAttrib4f):
(WebCore::GraphicsContext3D::vertexAttrib4fv):
(WebCore::GraphicsContext3D::vertexAttribPointer):
(WebCore::GraphicsContext3D::viewport):
(WebCore::GraphicsContext3D::getBooleanv):
(WebCore::GraphicsContext3D::getBufferParameteriv):
(WebCore::GraphicsContext3D::getFloatv):
(WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
(WebCore::GraphicsContext3D::getIntegerv):
(WebCore::GraphicsContext3D::getProgramiv):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getRenderbufferParameteriv):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
(WebCore::GraphicsContext3D::getTexParameterfv):
(WebCore::GraphicsContext3D::getTexParameteriv):
(WebCore::GraphicsContext3D::getUniformfv):
(WebCore::GraphicsContext3D::getUniformiv):
(WebCore::GraphicsContext3D::getUniformLocation):
(WebCore::GraphicsContext3D::getVertexAttribfv):
(WebCore::GraphicsContext3D::getVertexAttribiv):
(WebCore::GraphicsContext3D::getVertexAttribOffset):
(WebCore::GraphicsContext3D::texImage2D):
(WebCore::GraphicsContext3D::texSubImage2D):
(WebCore::GraphicsContext3D::createBuffer):
(WebCore::GraphicsContext3D::createFramebuffer):
(WebCore::GraphicsContext3D::createProgram):
(WebCore::GraphicsContext3D::createRenderbuffer):
(WebCore::GraphicsContext3D::createShader):
(WebCore::GraphicsContext3D::createTexture):
(WebCore::GraphicsContext3D::deleteBuffer):
(WebCore::GraphicsContext3D::deleteFramebuffer):
(WebCore::GraphicsContext3D::deleteProgram):
(WebCore::GraphicsContext3D::deleteRenderbuffer):
(WebCore::GraphicsContext3D::deleteShader):
(WebCore::GraphicsContext3D::deleteTexture):
(WebCore::GraphicsContext3D::sizeInBytes):
(WebCore::GraphicsContext3D::synthesizeGLError):
(WebCore::GraphicsContext3D::getImageData):
2010-02-25 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
......
......@@ -287,8 +287,17 @@ IDL_BINDINGS += \
html/canvas/CanvasPattern.idl \
html/canvas/CanvasRenderingContext.idl \
html/canvas/CanvasRenderingContext2D.idl \
html/canvas/WebGLActiveInfo.idl \
html/canvas/WebGLBuffer.idl \
html/canvas/WebGLContextAttributes.idl \
html/canvas/WebGLFramebuffer.idl \
html/canvas/WebGLProgram.idl \
html/canvas/WebGLRenderbuffer.idl \
html/canvas/WebGLRenderingContext.idl \
html/canvas/WebGLShader.idl \
html/canvas/WebGLShortArray.idl \
html/canvas/WebGLTexture.idl \
html/canvas/WebGLUniformLocation.idl \
html/canvas/WebGLUnsignedByteArray.idl \
html/canvas/WebGLUnsignedIntArray.idl \
html/canvas/WebGLUnsignedShortArray.idl \
......
......@@ -2688,6 +2688,87 @@ SOURCES += \
}
}
contains(DEFINES, ENABLE_3D_CANVAS=1) {
QT += opengl
HEADERS += \
bindings/js/JSWebGLArrayBufferConstructor.h \
bindings/js/JSWebGLArrayHelper.h \
bindings/js/JSWebGLByteArrayConstructor.h \
bindings/js/JSWebGLFloatArrayConstructor.h \
bindings/js/JSWebGLIntArrayConstructor.h \
bindings/js/JSWebGLShortArrayConstructor.h \
bindings/js/JSWebGLUnsignedByteArrayConstructor.h \
bindings/js/JSWebGLUnsignedIntArrayConstructor.h \
bindings/js/JSWebGLUnsignedShortArrayConstructor.h \
html/canvas/CanvasContextAttributes.h \
html/canvas/CanvasObject.h \
html/canvas/WebGLActiveInfo.h \
html/canvas/WebGLArrayBuffer.h \
html/canvas/WebGLArray.h \
html/canvas/WebGLBuffer.h \
html/canvas/WebGLByteArray.h \
html/canvas/WebGLContextAttributes.h \
html/canvas/WebGLFloatArray.h \
html/canvas/WebGLFramebuffer.h \
html/canvas/WebGLGetInfo.h \
html/canvas/WebGLIntArray.h \
html/canvas/WebGLProgram.h \
html/canvas/WebGLRenderbuffer.h \
html/canvas/WebGLRenderingContext.h \
html/canvas/WebGLShader.h \
html/canvas/WebGLShortArray.h \
html/canvas/WebGLTexture.h \
html/canvas/WebGLUniformLocation.h \
html/canvas/WebGLUnsignedByteArray.h \
html/canvas/WebGLUnsignedIntArray.h \
html/canvas/WebGLUnsignedShortArray.h \
platform/graphics/GraphicsContext3D.h
SOURCES += \
bindings/js/JSWebGLArrayBufferConstructor.cpp \
bindings/js/JSWebGLArrayCustom.cpp \
bindings/js/JSWebGLByteArrayConstructor.cpp \
bindings/js/JSWebGLByteArrayCustom.cpp \
bindings/js/JSWebGLFloatArrayConstructor.cpp \
bindings/js/JSWebGLFloatArrayCustom.cpp \
bindings/js/JSWebGLIntArrayConstructor.cpp \
bindings/js/JSWebGLIntArrayCustom.cpp \
bindings/js/JSWebGLRenderingContextCustom.cpp \
bindings/js/JSWebGLShortArrayConstructor.cpp \
bindings/js/JSWebGLShortArrayCustom.cpp \
bindings/js/JSWebGLUnsignedByteArrayConstructor.cpp \
bindings/js/JSWebGLUnsignedByteArrayCustom.cpp \
bindings/js/JSWebGLUnsignedIntArrayConstructor.cpp \
bindings/js/JSWebGLUnsignedIntArrayCustom.cpp \
bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp \
bindings/js/JSWebGLUnsignedShortArrayCustom.cpp \
html/canvas/CanvasContextAttributes.cpp \
html/canvas/CanvasObject.cpp \
html/canvas/WebGLArrayBuffer.cpp \
html/canvas/WebGLArray.cpp \
html/canvas/WebGLBuffer.cpp \
html/canvas/WebGLByteArray.cpp \
html/canvas/WebGLContextAttributes.cpp \
html/canvas/WebGLFloatArray.cpp \
html/canvas/WebGLFramebuffer.cpp \
html/canvas/WebGLGetInfo.cpp \
html/canvas/WebGLIntArray.cpp \
html/canvas/WebGLProgram.cpp \
html/canvas/WebGLRenderbuffer.cpp \
html/canvas/WebGLRenderingContext.cpp \
html/canvas/WebGLShader.cpp \
html/canvas/WebGLShortArray.cpp \
html/canvas/WebGLTexture.cpp \
html/canvas/WebGLUniformLocation.cpp \
html/canvas/WebGLUnsignedByteArray.cpp \
html/canvas/WebGLUnsignedIntArray.cpp \
html/canvas/WebGLUnsignedShortArray.cpp \
platform/graphics/GraphicsContext3D.cpp \
platform/graphics/qt/GraphicsContext3DQt.cpp \
}
include($$PWD/../WebKit/qt/Api/headers.pri)
include(../include/QtWebKit/classheaders.pri)
HEADERS += $$WEBKIT_API_HEADERS
......
......@@ -44,6 +44,13 @@ typedef void* PlatformGraphicsContext3D;
const PlatformGraphicsContext3D NullPlatformGraphicsContext3D = 0;
typedef GLuint Platform3DObject;
const Platform3DObject NullPlatform3DObject = 0;
#elif PLATFORM(QT)
#include <QtOpenGL/QtOpenGL>
typedef void* PlatformGraphicsContext3D;
const PlatformGraphicsContext3D NullPlatformGraphicsContext3D = 0;
typedef int Platform3DObject;
const Platform3DObject NullPlatform3DObject = 0;
#else
typedef void* PlatformGraphicsContext3D;
const PlatformGraphicsContext3D NullPlatformGraphicsContext3D = 0;
......@@ -73,7 +80,7 @@ namespace WebCore {
};
// FIXME: ideally this would be used on all platforms.
#if PLATFORM(CHROMIUM)
#if PLATFORM(CHROMIUM) || PLATFORM(QT)
class GraphicsContext3DInternal;
#endif
......@@ -409,6 +416,9 @@ namespace WebCore {
#elif PLATFORM(CHROMIUM)
PlatformGraphicsContext3D platformGraphicsContext3D() const;
Platform3DObject platformTexture() const;
#elif PLATFORM(QT)
PlatformGraphicsContext3D platformGraphicsContext3D();
Platform3DObject platformTexture() const;
#else
PlatformGraphicsContext3D platformGraphicsContext3D() const { return NullPlatformGraphicsContext3D; }
Platform3DObject platformTexture() const { return NullPlatform3DObject; }
......@@ -704,7 +714,7 @@ namespace WebCore {
#endif
// FIXME: ideally this would be used on all platforms.
#if PLATFORM(CHROMIUM)
#if PLATFORM(CHROMIUM) || PLATFORM(QT)
friend class GraphicsContext3DInternal;
OwnPtr<GraphicsContext3DInternal> m_internal;
#endif
......
This diff is collapsed.
......@@ -158,6 +158,13 @@ void QWebSettingsPrivate::apply()
settings->setAcceleratedCompositingEnabled(value);
#endif
#if ENABLE(3D_CANVAS)
value = attributes.value(QWebSettings::WebGLEnabled,
global->attributes.value(QWebSettings::WebGLEnabled));
settings->setWebGLEnabled(value);
#endif
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
......@@ -401,6 +408,7 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true);
d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, false);
d->attributes.insert(QWebSettings::WebGLEnabled, false);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
}
......
......@@ -70,7 +70,8 @@ public:
LocalContentCanAccessFileUrls,
DnsPrefetchEnabled,
XSSAuditorEnabled,
AcceleratedCompositingEnabled
AcceleratedCompositingEnabled,
WebGLEnabled
};
enum WebGraphic {
MissingImageGraphic,
......
2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com>
Reviewed by Kenneth Rohde Christiansen.
Qt WebGL support
Adds enabling and disabling of WebGL support to QWebSettings.
https://bugs.webkit.org/show_bug.cgi?id=35153
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
(QWebSettings::QWebSettings):
* Api/qwebsettings.h:
2010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
......
2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com>
Reviewed by Kenneth Rohde Christiansen.
Qt WebGL support
Adds toggling of WebGL support to QtLauncher.
https://bugs.webkit.org/show_bug.cgi?id=35153
* QtLauncher/main.cpp:
(LauncherWindow::toggleWebGL):
(LauncherWindow::setupUI):
2010-02-25 Ben Murdoch <benm@google.com>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -117,6 +117,7 @@ protected slots:
void setTouchMocking(bool on);
void toggleAcceleratedCompositing(bool toggle);
void toggleWebGL(bool toggle);
void initializeView(bool useGraphicsView = false);
public slots:
......@@ -463,6 +464,11 @@ void LauncherWindow::toggleAcceleratedCompositing(bool toggle)
page()->settings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, toggle);
}
void LauncherWindow::toggleWebGL(bool toggle)
{
page()->settings()->setAttribute(QWebSettings::WebGLEnabled, toggle);
}
void LauncherWindow::initializeView(bool useGraphicsView)
{
delete m_view;
......@@ -580,6 +586,10 @@ void LauncherWindow::setupUI()
toggleGraphicsView->setCheckable(true);
toggleGraphicsView->setChecked(false);
QAction* toggleWebGL = toolsMenu->addAction("Toggle WebGL", this, SLOT(toggleWebGL(bool)));
toggleWebGL->setCheckable(true);
toggleWebGL->setChecked(false);
QAction* toggleAcceleratedCompositing = graphicsViewMenu->addAction("Toggle Accelerated Compositing", this, SLOT(toggleAcceleratedCompositing(bool)));
toggleAcceleratedCompositing->setCheckable(true);
toggleAcceleratedCompositing->setChecked(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment