From 581338764dfa926c876a93e0547a935b9e5d2505 Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Fri, 7 Jun 2019 10:20:19 +0000 Subject: [PATCH] Bug 1557577 - Remove GLContext::fDrawRangeElements. r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D34104 --HG-- extra : moz-landing-system : lando --- dom/canvas/WebGL2Context.cpp | 1 - gfx/gl/GLContext.cpp | 13 ------------- gfx/gl/GLContext.h | 22 ---------------------- gfx/gl/GLContextFeatures.cpp | 5 ----- gfx/gl/GLContextSymbols.h | 4 ---- 5 files changed, 45 deletions(-) diff --git a/dom/canvas/WebGL2Context.cpp b/dom/canvas/WebGL2Context.cpp index 67409cee6ed8..44832faf22bd 100644 --- a/dom/canvas/WebGL2Context.cpp +++ b/dom/canvas/WebGL2Context.cpp @@ -50,7 +50,6 @@ static const gl::GLFeature kRequiredFeatures[] = { gl::GLFeature::copy_buffer, gl::GLFeature::depth_texture, gl::GLFeature::draw_instanced, - gl::GLFeature::draw_range_elements, gl::GLFeature::element_index_uint, gl::GLFeature::frag_color_float, gl::GLFeature::frag_depth, diff --git a/gfx/gl/GLContext.cpp b/gfx/gl/GLContext.cpp index c0dd44eb646d..73abb375efc3 100644 --- a/gfx/gl/GLContext.cpp +++ b/gfx/gl/GLContext.cpp @@ -137,7 +137,6 @@ static const char* const sExtensionNames[] = { "GL_EXT_draw_buffers", "GL_EXT_draw_buffers2", "GL_EXT_draw_instanced", - "GL_EXT_draw_range_elements", "GL_EXT_float_blend", "GL_EXT_frag_depth", "GL_EXT_framebuffer_blit", @@ -1236,18 +1235,6 @@ void GLContext::LoadMoreSymbols(const SymbolLoader& loader) { fnLoadFeatureByCore(coreSymbols, extSymbols, GLFeature::draw_buffers); } - if (IsSupported(GLFeature::draw_range_elements)) { - const SymLoadStruct coreSymbols[] = { - { (PRFuncPtr*) &mSymbols.fDrawRangeElements, {{ "glDrawRangeElements" }} }, - END_SYMBOLS - }; - const SymLoadStruct extSymbols[] = { - { (PRFuncPtr*) &mSymbols.fDrawRangeElements, {{ "glDrawRangeElementsEXT" }} }, - END_SYMBOLS - }; - fnLoadFeatureByCore(coreSymbols, extSymbols, GLFeature::draw_range_elements); - } - if (IsSupported(GLFeature::get_integer_indexed)) { const SymLoadStruct coreSymbols[] = { { (PRFuncPtr*) &mSymbols.fGetIntegeri_v, {{ "glGetIntegeri_v" }} }, diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index 648ed9f89557..f0e56debecd9 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -83,7 +83,6 @@ enum class GLFeature { depth_texture, draw_buffers, draw_instanced, - draw_range_elements, element_index_uint, ES2_compatibility, ES3_compatibility, @@ -412,7 +411,6 @@ class GLContext : public GenericAtomicRefCounted, EXT_draw_buffers, EXT_draw_buffers2, EXT_draw_instanced, - EXT_draw_range_elements, EXT_float_blend, EXT_frag_depth, EXT_framebuffer_blit, @@ -2457,26 +2455,6 @@ class GLContext : public GenericAtomicRefCounted, AFTER_GL_CALL; } - // ----------------------------------------------------------------------------- - // Feature draw_range_elements - public: - void fDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, - GLenum type, const GLvoid* indices) { - BeforeGLDrawCall(); - raw_fDrawRangeElements(mode, start, end, count, type, indices); - AfterGLDrawCall(); - } - - private: - void raw_fDrawRangeElements(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid* indices) { - BEFORE_GL_CALL; - ASSERT_SYMBOL_PRESENT(fDrawRangeElements); - mSymbols.fDrawRangeElements(mode, start, end, count, type, indices); - AFTER_GL_CALL; - } - // ----------------------------------------------------------------------------- // Package XXX_framebuffer_blit public: diff --git a/gfx/gl/GLContextFeatures.cpp b/gfx/gl/GLContextFeatures.cpp index 0ca83c8830da..a2410b2c2a98 100644 --- a/gfx/gl/GLContextFeatures.cpp +++ b/gfx/gl/GLContextFeatures.cpp @@ -111,11 +111,6 @@ static const FeatureInfo sFeatureInfoArr[] = { {GLContext::ARB_draw_instanced, GLContext::EXT_draw_instanced, GLContext::NV_draw_instanced, GLContext::ANGLE_instanced_arrays, GLContext::Extensions_End}}, - {"draw_range_elements", - GLVersion::GL1_2, - GLESVersion::ES3, - GLContext::Extension_None, - {GLContext::EXT_draw_range_elements, GLContext::Extensions_End}}, {"element_index_uint", GLVersion::GL2, GLESVersion::ES3, diff --git a/gfx/gl/GLContextSymbols.h b/gfx/gl/GLContextSymbols.h index 21c44fd3509b..dd115e483fa0 100644 --- a/gfx/gl/GLContextSymbols.h +++ b/gfx/gl/GLContextSymbols.h @@ -351,10 +351,6 @@ struct GLContextSymbols final { void(GLAPIENTRY* fGetObjectPtrLabel)(const GLvoid*, GLsizei, GLsizei*, GLchar*); - // draw_range_elements - void(GLAPIENTRY* fDrawRangeElements)(GLenum, GLuint, GLuint, GLsizei, GLenum, - const GLvoid*); - // NV_fence void(GLAPIENTRY* fGenFences)(GLsizei, GLuint*); void(GLAPIENTRY* fDeleteFences)(GLsizei, const GLuint*);