2010-12-10 Kenneth Russell <kbr@google.com>
authorkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Dec 2010 22:50:02 +0000 (22:50 +0000)
committerkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Dec 2010 22:50:02 +0000 (22:50 +0000)
commitf4685fc40305ab3d44580b77dc8fb5b0aef3cda6
tree4a646a22532da489eaf49985ed252c88b36b94d8
parentd0a9b468ee61a0915514bcf19e29d5298d7a2844
2010-12-10  Kenneth Russell  <kbr@google.com>

        Reviewed by James Robinson.

        Implement extension entry points and remove EXTENSIONS enum
        https://bugs.webkit.org/show_bug.cgi?id=40316

        Added support for ensuring that a particular OpenGL extension is
        enabled.

        * public/WebGraphicsContext3D.h:
        * src/Extensions3DChromium.cpp:
        (WebCore::Extensions3DChromium::ensureEnabled):
        * src/GraphicsContext3DChromium.cpp:
        (WebCore::GraphicsContext3DInternal::initializeExtensions):
        (WebCore::GraphicsContext3DInternal::supportsExtension):
        (WebCore::GraphicsContext3DInternal::ensureExtensionEnabled):
        * src/GraphicsContext3DInternal.h:
        * src/WebGraphicsContext3DDefaultImpl.cpp:
        (WebKit::WebGraphicsContext3DDefaultImpl::getRequestableExtensionsCHROMIUM):
        (WebKit::WebGraphicsContext3DDefaultImpl::requestExtensionCHROMIUM):
        * src/WebGraphicsContext3DDefaultImpl.h:
2010-12-10  Kenneth Russell  <kbr@google.com>

        Reviewed by James Robinson.

        Implement extension entry points and remove EXTENSIONS enum
        https://bugs.webkit.org/show_bug.cgi?id=40316

        Implemented WebGLRenderingContext's getSupportedExtensions and
        getExtensions entry points, and, to verify them, added support for
        the first specified WebGL extension, OES_texture_float. This
        extension is now advertised in the Chromium and WebKit ports when
        the underlying hardware supports it.

        The new OES_texture_float test in the WebGL conformance suite
        verifies the allocation and population of floating point textures,
        and their use as render targets. However, because this extension
        is optional, it is not easily testable with a layout test; there
        is only one set of expectations for a given test, and two would be
        needed, one when the extension is available and one when it is not.

        Tested with the oes-texture-float.html WebGL conformance test in
        Chromium and WebKit on Mac OS X on hardware that supports the
        extension. Also verified with a configuration that does not
        advertise the extension that this same test passes.

        * CMakeLists.txt:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSWebGLRenderingContextCustom.cpp:
        (WebCore::toJS):
        (WebCore::JSWebGLRenderingContext::markChildren):
        (WebCore::JSWebGLRenderingContext::getExtension):
        (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
        * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
        (WebCore::toV8Object):
        (WebCore::V8WebGLRenderingContext::getExtensionCallback):
        (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
        * html/canvas/OESTextureFloat.cpp: Added.
        (WebCore::OESTextureFloat::OESTextureFloat):
        (WebCore::OESTextureFloat::~OESTextureFloat):
        (WebCore::OESTextureFloat::getName):
        (WebCore::OESTextureFloat::create):
        * html/canvas/OESTextureFloat.h: Added.
        * html/canvas/OESTextureFloat.idl: Added.
        * html/canvas/WebGLExtension.cpp: Added.
        (WebCore::WebGLExtension::WebGLExtension):
        (WebCore::WebGLExtension::~WebGLExtension):
        * html/canvas/WebGLExtension.h: Added.
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getExtension):
        (WebCore::WebGLRenderingContext::getSupportedExtensions):
        (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
        (WebCore::WebGLRenderingContext::validateTexFuncData):
        (WebCore::WebGLRenderingContext::getNumberOfExtensions):
        (WebCore::WebGLRenderingContext::getExtensionNumber):
        * html/canvas/WebGLRenderingContext.h:
        * html/canvas/WebGLRenderingContext.idl:
        * platform/graphics/Extensions3D.h:
        * platform/graphics/GraphicsContext3D.cpp:
        (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
        (WebCore::GraphicsContext3D::extractTextureData):
        (WebCore::doUnpackingAndPacking):
        (WebCore::doPacking):
        (WebCore::doFloatingPointPacking):
        (WebCore::GraphicsContext3D::packPixels):
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/chromium/Extensions3DChromium.h:
        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
        (WebCore::Extensions3DOpenGL::supports):
        (WebCore::Extensions3DOpenGL::ensureEnabled):
        * platform/graphics/opengl/Extensions3DOpenGL.h:
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        (WebCore::GraphicsContext3D::texImage2D):
        * platform/graphics/qt/Extensions3DQt.cpp:
        (WebCore::Extensions3DQt::ensureEnabled):
        * platform/graphics/qt/Extensions3DQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pri
WebCore/WebCore.pro
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
WebCore/html/canvas/OESTextureFloat.cpp [new file with mode: 0644]
WebCore/html/canvas/OESTextureFloat.h [new file with mode: 0644]
WebCore/html/canvas/OESTextureFloat.idl [new file with mode: 0644]
WebCore/html/canvas/WebGLExtension.cpp [new file with mode: 0644]
WebCore/html/canvas/WebGLExtension.h [new file with mode: 0644]
WebCore/html/canvas/WebGLRenderingContext.cpp
WebCore/html/canvas/WebGLRenderingContext.h
WebCore/html/canvas/WebGLRenderingContext.idl
WebCore/platform/graphics/Extensions3D.h
WebCore/platform/graphics/GraphicsContext3D.cpp
WebCore/platform/graphics/GraphicsContext3D.h
WebCore/platform/graphics/chromium/Extensions3DChromium.h
WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
WebCore/platform/graphics/opengl/Extensions3DOpenGL.h
WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
WebCore/platform/graphics/qt/Extensions3DQt.cpp
WebCore/platform/graphics/qt/Extensions3DQt.h
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebGraphicsContext3D.h
WebKit/chromium/src/Extensions3DChromium.cpp
WebKit/chromium/src/GraphicsContext3DChromium.cpp
WebKit/chromium/src/GraphicsContext3DInternal.h
WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h