⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267613 in webkit


Ignore:
Timestamp:
Sep 25, 2020, 5:41:37 PM (6 years ago)
Author:
James Darpinian
Message:

Support OES_fbo_render_mipmap
https://bugs.webkit.org/show_bug.cgi?id=217003

Reviewed by Kenneth Russell.

Source/WebCore:

Test: webgl/conformance/extensions/oes-fbo-render-mipmap.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • html/canvas/OESFBORenderMipmap.cpp: Added.

(WebCore::OESFBORenderMipmap::OESFBORenderMipmap):
(WebCore::OESFBORenderMipmap::getName const):
(WebCore::OESFBORenderMipmap::supported):

  • html/canvas/OESFBORenderMipmap.h: Added.
  • html/canvas/OESFBORenderMipmap.idl: Added.
  • html/canvas/WebGLExtension.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
(WebCore::WebGLRenderingContextBase::extensionIsEnabled):
(WebCore::WebGLRenderingContextBase::loseExtensions):

  • html/canvas/WebGLRenderingContextBase.h:

LayoutTests:

  • webgl/conformance/extensions/oes-fbo-render-mipmap-expected.txt: Added.
  • webgl/conformance/extensions/oes-fbo-render-mipmap.html: Added.
  • webgl/resources/webgl_test_files/conformance/extensions/oes-fbo-render-mipmap.html: Added.
Location:
trunk
Files:
6 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r267607 r267613  
     12020-09-25  James Darpinian  <jdarpinian@chromium.org>
     2
     3        Support OES_fbo_render_mipmap
     4        https://bugs.webkit.org/show_bug.cgi?id=217003
     5
     6        Reviewed by Kenneth Russell.
     7
     8        * webgl/conformance/extensions/oes-fbo-render-mipmap-expected.txt: Added.
     9        * webgl/conformance/extensions/oes-fbo-render-mipmap.html: Added.
     10        * webgl/resources/webgl_test_files/conformance/extensions/oes-fbo-render-mipmap.html: Added.
     11
    1122020-09-25  Karl Rackler  <rackler@apple.com>
    213
  • trunk/Source/WebCore/CMakeLists.txt

    r267601 r267613  
    14551455        html/canvas/EXTsRGB.cpp
    14561456        html/canvas/OESElementIndexUint.cpp
     1457        html/canvas/OESFBORenderMipmap.cpp
    14571458        html/canvas/OESStandardDerivatives.cpp
    14581459        html/canvas/OESTextureFloat.cpp
     
    15121513    html/canvas/EXTsRGB.idl
    15131514    html/canvas/OESElementIndexUint.idl
     1515    html/canvas/OESFBORenderMipmap.idl
    15141516    html/canvas/OESStandardDerivatives.idl
    15151517    html/canvas/OESTextureFloat.idl
  • trunk/Source/WebCore/ChangeLog

    r267612 r267613  
     12020-09-25  James Darpinian  <jdarpinian@chromium.org>
     2
     3        Support OES_fbo_render_mipmap
     4        https://bugs.webkit.org/show_bug.cgi?id=217003
     5
     6        Reviewed by Kenneth Russell.
     7
     8        Test: webgl/conformance/extensions/oes-fbo-render-mipmap.html
     9
     10        * CMakeLists.txt:
     11        * DerivedSources.make:
     12        * Sources.txt:
     13        * WebCore.xcodeproj/project.pbxproj:
     14        * bindings/js/JSDOMConvertWebGL.cpp:
     15        (WebCore::convertToJSValue):
     16        * html/canvas/OESFBORenderMipmap.cpp: Added.
     17        (WebCore::OESFBORenderMipmap::OESFBORenderMipmap):
     18        (WebCore::OESFBORenderMipmap::getName const):
     19        (WebCore::OESFBORenderMipmap::supported):
     20        * html/canvas/OESFBORenderMipmap.h: Added.
     21        * html/canvas/OESFBORenderMipmap.idl: Added.
     22        * html/canvas/WebGLExtension.h:
     23        * html/canvas/WebGLRenderingContext.cpp:
     24        (WebCore::WebGLRenderingContext::getExtension):
     25        (WebCore::WebGLRenderingContext::getSupportedExtensions):
     26        * html/canvas/WebGLRenderingContextBase.cpp:
     27        (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
     28        (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
     29        (WebCore::WebGLRenderingContextBase::loseExtensions):
     30        * html/canvas/WebGLRenderingContextBase.h:
     31
    1322020-09-25  Tim Horton  <timothy_horton@apple.com>
    233
  • trunk/Source/WebCore/DerivedSources.make

    r267601 r267613  
    958958    $(WebCore)/html/canvas/ImageSmoothingQuality.idl \
    959959    $(WebCore)/html/canvas/OESElementIndexUint.idl \
     960    $(WebCore)/html/canvas/OESFBORenderMipmap.idl \
    960961    $(WebCore)/html/canvas/OESStandardDerivatives.idl \
    961962    $(WebCore)/html/canvas/OESTextureFloat.idl \
  • trunk/Source/WebCore/Sources.txt

    r267601 r267613  
    12571257html/canvas/ImageBitmapRenderingContext.cpp
    12581258html/canvas/OESElementIndexUint.cpp
     1259html/canvas/OESFBORenderMipmap.cpp
    12591260html/canvas/OESStandardDerivatives.cpp
    12601261html/canvas/OESTextureFloat.cpp
     
    31343135JSNotificationPermissionCallback.cpp
    31353136JSOESElementIndexUint.cpp
     3137JSOESFBORenderMipmap.cpp
    31363138JSOESStandardDerivatives.cpp
    31373139JSOESTextureFloat.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r267602 r267613  
    1207812078                A37049DA251D4B8E009BA1B3 /* EXTFloatBlend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXTFloatBlend.h; sourceTree = "<group>"; };
    1207912079                A37049DB251D4B8F009BA1B3 /* EXTFloatBlend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EXTFloatBlend.cpp; sourceTree = "<group>"; };
     12080                A37A42CE251EB99600F75AFF /* OESFBORenderMipmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OESFBORenderMipmap.cpp; sourceTree = "<group>"; };
     12081                A37A42D0251EB99600F75AFF /* OESFBORenderMipmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OESFBORenderMipmap.h; sourceTree = "<group>"; };
     12082                A37A42D1251EB99700F75AFF /* OESFBORenderMipmap.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESFBORenderMipmap.idl; sourceTree = "<group>"; };
    1208012083                A3AF9D81203252EE006CAD06 /* UserAgentCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UserAgentCocoa.mm; sourceTree = "<group>"; };
    1208112084                A3AF9D8220325324006CAD06 /* UserAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserAgent.h; sourceTree = "<group>"; };
     
    1941319416                                7E5D7A74161D3F8F00896C34 /* OESElementIndexUint.h */,
    1941419417                                E176580C180DF3A0005A96D1 /* OESElementIndexUint.idl */,
     19418                                A37A42CE251EB99600F75AFF /* OESFBORenderMipmap.cpp */,
     19419                                A37A42D0251EB99600F75AFF /* OESFBORenderMipmap.h */,
     19420                                A37A42D1251EB99700F75AFF /* OESFBORenderMipmap.idl */,
    1941519421                                9001773D12E0347800648462 /* OESStandardDerivatives.cpp */,
    1941619422                                9001773E12E0347800648462 /* OESStandardDerivatives.h */,
  • trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp

    r267601 r267613  
    4040#include "JSEXTsRGB.h"
    4141#include "JSOESElementIndexUint.h"
     42#include "JSOESFBORenderMipmap.h"
    4243#include "JSOESStandardDerivatives.h"
    4344#include "JSOESTextureFloat.h"
     
    193194    case WebGLExtension::OESElementIndexUintName:
    194195        return toJS(&lexicalGlobalObject, &globalObject, static_cast<OESElementIndexUint&>(extension));
     196    case WebGLExtension::OESFBORenderMipmapName:
     197        return toJS(&lexicalGlobalObject, &globalObject, static_cast<OESFBORenderMipmap&>(extension));
    195198    case WebGLExtension::WebGLDebugRendererInfoName:
    196199        return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLDebugRendererInfo&>(extension));
  • trunk/Source/WebCore/html/canvas/WebGLExtension.h

    r267601 r267613  
    5757        WebGLDrawBuffersName,
    5858        OESElementIndexUintName,
     59        OESFBORenderMipmapName,
    5960        WebGLCompressedTextureATCName,
    6061        WebGLCompressedTextureETCName,
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r267601 r267613  
    4545#include "InspectorInstrumentation.h"
    4646#include "OESElementIndexUint.h"
     47#include "OESFBORenderMipmap.h"
    4748#include "OESStandardDerivatives.h"
    4849#include "OESTextureFloat.h"
     
    160161    ENABLE_IF_REQUESTED(OESVertexArrayObject, m_oesVertexArrayObject, "OES_vertex_array_object", enableSupportedExtension("GL_OES_vertex_array_object"_s));
    161162    ENABLE_IF_REQUESTED(OESElementIndexUint, m_oesElementIndexUint, "OES_element_index_uint", enableSupportedExtension("GL_OES_element_index_uint"_s));
     163    ENABLE_IF_REQUESTED(OESFBORenderMipmap, m_oesFBORenderMipmap, "OES_fbo_render_mipmap", enableSupportedExtension("GL_OES_fbo_render_mipmap"_s));
    162164    ENABLE_IF_REQUESTED(WebGLLoseContext, m_webglLoseContext, "WEBGL_lose_context", true);
    163165    ENABLE_IF_REQUESTED(WebGLCompressedTextureASTC, m_webglCompressedTextureASTC, "WEBGL_compressed_texture_astc", WebGLCompressedTextureASTC::supported(*this));
     
    235237    if (m_context->getExtensions().supports("GL_OES_element_index_uint"_s))
    236238        result.append("OES_element_index_uint"_s);
     239    if (m_context->getExtensions().supports("GL_OES_fbo_render_mipmap"_s))
     240        result.append("OES_fbo_render_mipmap"_s);
    237241    result.append("WEBGL_lose_context"_s);
    238242    if (WebGLCompressedTextureASTC::supported(*this))
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

    r267601 r267613  
    6363#include "NotImplemented.h"
    6464#include "OESElementIndexUint.h"
     65#include "OESFBORenderMipmap.h"
    6566#include "OESStandardDerivatives.h"
    6667#include "OESTextureFloat.h"
     
    27252726    if (isContextLostOrPending() || !validateFramebufferFuncParameters("framebufferTexture2D", target, attachment))
    27262727        return;
    2727     if (level && isWebGL1()) {
    2728         synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "framebufferTexture2D", "level not 0");
     2728    if (level && isWebGL1() && !m_oesFBORenderMipmap) {
     2729        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "framebufferTexture2D", "level not 0 and OES_fbo_render_mipmap not enabled");
    27292730        return;
    27302731    }
     
    37243725    CHECK_EXTENSION(m_oesVertexArrayObject, "OES_vertex_array_object");
    37253726    CHECK_EXTENSION(m_oesElementIndexUint, "OES_element_index_uint");
     3727    CHECK_EXTENSION(m_oesFBORenderMipmap, "OES_fbo_render_mipmap");
    37263728    CHECK_EXTENSION(m_webglLoseContext, "WEBGL_lose_context");
    37273729    CHECK_EXTENSION(m_webglDebugRendererInfo, "WEBGL_debug_renderer_info");
     
    77927794    LOSE_EXTENSION(m_oesVertexArrayObject);
    77937795    LOSE_EXTENSION(m_oesElementIndexUint);
     7796    LOSE_EXTENSION(m_oesFBORenderMipmap);
    77947797    LOSE_EXTENSION(m_webglLoseContext);
    77957798    LOSE_EXTENSION(m_webglDebugRendererInfo);
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h

    r267601 r267613  
    8787class OESVertexArrayObject;
    8888class OESElementIndexUint;
     89class OESFBORenderMipmap;
    8990#if ENABLE(OFFSCREEN_CANVAS)
    9091class OffscreenCanvas;
     
    678679    RefPtr<OESVertexArrayObject> m_oesVertexArrayObject;
    679680    RefPtr<OESElementIndexUint> m_oesElementIndexUint;
     681    RefPtr<OESFBORenderMipmap> m_oesFBORenderMipmap;
    680682    RefPtr<WebGLLoseContext> m_webglLoseContext;
    681683    RefPtr<WebGLDebugRendererInfo> m_webglDebugRendererInfo;
Note: See TracChangeset for help on using the changeset viewer.