Backed out changeset 8d885b139d7d (bug 912280) for bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 07 Feb 2014 10:38:27 -0500
changeset 167855 716974a64aae887e8fa661f5c10f4d2457d83a7c
parent 167854 6abb659b106e04cdb97c7545d986025654972514
child 167856 5ea08da71f1bd3da944db9a21db7705bb941c3ed
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs912280
milestone30.0a1
backs out8d885b139d7def0c8db7ed8bc93744d4f29546c7
Backed out changeset 8d885b139d7d (bug 912280) for bustage.
content/canvas/src/WebGLContext.h
content/canvas/src/WebGLContextExtensions.cpp
content/canvas/src/WebGLExtensionTextureHalfFloatLinear.cpp
content/canvas/src/WebGLExtensions.h
content/canvas/src/WebGLTexture.cpp
content/canvas/src/moz.build
dom/bindings/Bindings.conf
dom/webidl/WebGLRenderingContext.webidl
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
gfx/gl/GLContextFeatures.cpp
--- a/content/canvas/src/WebGLContext.h
+++ b/content/canvas/src/WebGLContext.h
@@ -896,17 +896,16 @@ protected:
     enum WebGLExtensionID {
         EXT_sRGB,
         EXT_texture_filter_anisotropic,
         OES_element_index_uint,
         OES_standard_derivatives,
         OES_texture_float,
         OES_texture_float_linear,
         OES_texture_half_float,
-        OES_texture_half_float_linear,
         OES_vertex_array_object,
         WEBGL_compressed_texture_atc,
         WEBGL_compressed_texture_pvrtc,
         WEBGL_compressed_texture_s3tc,
         WEBGL_debug_renderer_info,
         WEBGL_depth_texture,
         WEBGL_lose_context,
         WEBGL_draw_buffers,
--- a/content/canvas/src/WebGLContextExtensions.cpp
+++ b/content/canvas/src/WebGLContextExtensions.cpp
@@ -19,17 +19,16 @@ using namespace mozilla::gl;
 static const char *sExtensionNames[] = {
     "EXT_sRGB",
     "EXT_texture_filter_anisotropic",
     "OES_element_index_uint",
     "OES_standard_derivatives",
     "OES_texture_float",
     "OES_texture_float_linear",
     "OES_texture_half_float",
-    "OES_texture_half_float_linear",
     "OES_vertex_array_object",
     "WEBGL_compressed_texture_atc",
     "WEBGL_compressed_texture_pvrtc",
     "WEBGL_compressed_texture_s3tc",
     "WEBGL_debug_renderer_info",
     "WEBGL_depth_texture",
     "WEBGL_lose_context",
     "WEBGL_draw_buffers",
@@ -89,18 +88,16 @@ bool WebGLContext::IsExtensionSupported(
         case OES_texture_float_linear:
             return gl->IsSupported(GLFeature::texture_float_linear);
         case OES_texture_half_float:
             // If we have Feature::texture_half_float, we must not be on ES2
             // and need to translate HALF_FLOAT_OES -> HALF_FLOAT.  We do that
             // right before making the relevant calls.
             return gl->IsExtensionSupported(GLContext::OES_texture_half_float) ||
                    gl->IsSupported(GLFeature::texture_half_float);
-        case OES_texture_half_float_linear:
-            return gl->IsSupported(GLFeature::texture_half_float_linear);
         case OES_vertex_array_object:
             return WebGLExtensionVertexArray::IsSupported(this);
         case EXT_texture_filter_anisotropic:
             return gl->IsExtensionSupported(GLContext::EXT_texture_filter_anisotropic);
         case WEBGL_compressed_texture_s3tc:
             if (gl->IsExtensionSupported(GLContext::EXT_texture_compression_s3tc)) {
                 return true;
             }
@@ -261,19 +258,16 @@ WebGLContext::EnableExtension(WebGLExten
             obj = new WebGLExtensionTextureFloat(this);
             break;
         case OES_texture_float_linear:
             obj = new WebGLExtensionTextureFloatLinear(this);
             break;
         case OES_texture_half_float:
             obj = new WebGLExtensionTextureHalfFloat(this);
             break;
-        case OES_texture_half_float_linear:
-            obj = new WebGLExtensionTextureHalfFloatLinear(this);
-            break;
         case WEBGL_draw_buffers:
             obj = new WebGLExtensionDrawBuffers(this);
             break;
         case OES_vertex_array_object:
             obj = new WebGLExtensionVertexArray(this);
             break;
         case ANGLE_instanced_arrays:
             obj = new WebGLExtensionInstancedArrays(this);
deleted file mode 100644
--- a/content/canvas/src/WebGLExtensionTextureHalfFloatLinear.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "WebGLContext.h"
-#include "WebGLExtensions.h"
-#include "mozilla/dom/WebGLRenderingContextBinding.h"
-
-using namespace mozilla;
-
-WebGLExtensionTextureHalfFloatLinear::WebGLExtensionTextureHalfFloatLinear(WebGLContext* context)
-    : WebGLExtensionBase(context)
-{
-}
-
-WebGLExtensionTextureHalfFloatLinear::~WebGLExtensionTextureHalfFloatLinear()
-{
-}
-
-IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureHalfFloatLinear)
--- a/content/canvas/src/WebGLExtensions.h
+++ b/content/canvas/src/WebGLExtensions.h
@@ -166,26 +166,16 @@ class WebGLExtensionTextureHalfFloat
 {
 public:
     WebGLExtensionTextureHalfFloat(WebGLContext*);
     virtual ~WebGLExtensionTextureHalfFloat();
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
-class WebGLExtensionTextureHalfFloatLinear
-    : public WebGLExtensionBase
-{
-public:
-    WebGLExtensionTextureHalfFloatLinear(WebGLContext*);
-    virtual ~WebGLExtensionTextureHalfFloatLinear();
-
-    DECL_WEBGL_EXTENSION_GOOP
-};
-
 class WebGLExtensionDrawBuffers
     : public WebGLExtensionBase
 {
 public:
     WebGLExtensionDrawBuffers(WebGLContext*);
     virtual ~WebGLExtensionDrawBuffers();
 
     void DrawBuffersWEBGL(const dom::Sequence<GLenum>& buffers);
--- a/content/canvas/src/WebGLTexture.cpp
+++ b/content/canvas/src/WebGLTexture.cpp
@@ -345,18 +345,18 @@ WebGLTexture::ResolvedFakeBlackStatus() 
         }
         else if (mMagFilter == LOCAL_GL_LINEAR)
         {
             mContext->GenerateWarning("%s is a texture with a linear magnification filter, "
                                       "which is not compatible with gl.FLOAT by default. "
                                       "Try enabling the OES_texture_float_linear extension if supported.", msg_rendering_as_black);
             mFakeBlackStatus = WebGLTextureFakeBlackStatus::IncompleteTexture;
         }
-    } else if (ImageInfoBase().mType == LOCAL_GL_HALF_FLOAT_OES &&
-               !Context()->IsExtensionEnabled(WebGLContext::OES_texture_half_float_linear))
+    }
+    else if (ImageInfoBase().mType == LOCAL_GL_HALF_FLOAT_OES)
     {
         if (mMinFilter == LOCAL_GL_LINEAR ||
             mMinFilter == LOCAL_GL_LINEAR_MIPMAP_LINEAR ||
             mMinFilter == LOCAL_GL_LINEAR_MIPMAP_NEAREST ||
             mMinFilter == LOCAL_GL_NEAREST_MIPMAP_LINEAR)
         {
             mContext->GenerateWarning("%s is a texture with a linear minification filter, "
                                       "which is not compatible with gl.HALF_FLOAT by default. "
--- a/content/canvas/src/moz.build
+++ b/content/canvas/src/moz.build
@@ -54,17 +54,16 @@ if CONFIG['MOZ_WEBGL']:
         'WebGLExtensionInstancedArrays.cpp',
         'WebGLExtensionLoseContext.cpp',
         'WebGLExtensionSRGB.cpp',
         'WebGLExtensionStandardDerivatives.cpp',
         'WebGLExtensionTextureFilterAnisotropic.cpp',
         'WebGLExtensionTextureFloat.cpp',
         'WebGLExtensionTextureFloatLinear.cpp',
         'WebGLExtensionTextureHalfFloat.cpp',
-        'WebGLExtensionTextureHalfFloatLinear.cpp',
         'WebGLExtensionVertexArray.cpp',
         'WebGLFramebuffer.cpp',
         'WebGLObjectModel.cpp',
         'WebGLProgram.cpp',
         'WebGLQuery.cpp',
         'WebGLRenderbuffer.cpp',
         'WebGLShader.cpp',
         'WebGLShaderPrecisionFormat.cpp',
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -1405,21 +1405,16 @@ DOMInterfaces = {
     'headerFile': 'WebGLExtensions.h'
 },
 
 'WebGLExtensionTextureHalfFloat': {
    'nativeType': 'mozilla::WebGLExtensionTextureHalfFloat',
    'headerFile': 'WebGLExtensions.h'
 },
 
-'WebGLExtensionTextureHalfFloatLinear': {
-   'nativeType': 'mozilla::WebGLExtensionTextureHalfFloatLinear',
-   'headerFile': 'WebGLExtensions.h'
-},
-
 'WebGLExtensionDrawBuffers': {
     'nativeType': 'mozilla::WebGLExtensionDrawBuffers',
     'headerFile': 'WebGLExtensions.h'
 },
 
 'WebGLExtensionVertexArray': {
     'nativeType': 'mozilla::WebGLExtensionVertexArray',
     'headerFile': 'WebGLExtensions.h'
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -897,21 +897,16 @@ interface WebGLExtensionTextureFloatLine
 
 [NoInterfaceObject]
 interface WebGLExtensionTextureHalfFloat
 {
     const GLenum HALF_FLOAT_OES = 0x8D61;
 };
 
 [NoInterfaceObject]
-interface WebGLExtensionTextureHalfFloatLinear
-{
-};
-
-[NoInterfaceObject]
 interface WebGLExtensionVertexArray {
     const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;
 
     WebGLVertexArray? createVertexArrayOES();
     void deleteVertexArrayOES(WebGLVertexArray? arrayObject);
     [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArray? arrayObject);
     void bindVertexArrayOES(WebGLVertexArray? arrayObject);
 };
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -79,17 +79,16 @@ static const char *sExtensionNames[] = {
     "GL_ARB_texture_non_power_of_two",
     "GL_ARB_pixel_buffer_object",
     "GL_ARB_ES2_compatibility",
     "GL_ARB_ES3_compatibility",
     "GL_OES_texture_float",
     "GL_OES_texture_float_linear",
     "GL_ARB_texture_float",
     "GL_OES_texture_half_float",
-    "GL_OES_texture_half_float_linear",
     "GL_NV_half_float",
     "GL_EXT_unpack_subimage",
     "GL_OES_standard_derivatives",
     "GL_EXT_texture_filter_anisotropic",
     "GL_EXT_texture_compression_s3tc",
     "GL_EXT_texture_compression_dxt1",
     "GL_ANGLE_texture_compression_dxt3",
     "GL_ANGLE_texture_compression_dxt5",
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -102,17 +102,16 @@ MOZ_BEGIN_ENUM_CLASS(GLFeature)
     packed_depth_stencil,
     query_objects,
     robustness,
     sRGB,
     standard_derivatives,
     texture_float,
     texture_float_linear,
     texture_half_float,
-    texture_half_float_linear,
     texture_non_power_of_two,
     transform_feedback,
     vertex_array_object,
     EnumMax
 MOZ_END_ENUM_CLASS(GLFeature)
 
 MOZ_BEGIN_ENUM_CLASS(ContextProfile, uint8_t)
     Unknown = 0,
@@ -356,17 +355,16 @@ public:
         ARB_texture_non_power_of_two,
         ARB_pixel_buffer_object,
         ARB_ES2_compatibility,
         ARB_ES3_compatibility,
         OES_texture_float,
         OES_texture_float_linear,
         ARB_texture_float,
         OES_texture_half_float,
-        OES_texture_half_float_linear,
         NV_half_float,
         EXT_unpack_subimage,
         OES_standard_derivatives,
         EXT_texture_filter_anisotropic,
         EXT_texture_compression_s3tc,
         EXT_texture_compression_dxt1,
         ANGLE_texture_compression_dxt3,
         ANGLE_texture_compression_dxt5,
--- a/gfx/gl/GLContextFeatures.cpp
+++ b/gfx/gl/GLContextFeatures.cpp
@@ -305,28 +305,16 @@ static const FeatureInfo sFeatureInfoArr
          *   GL_HALF_FLOAT     = 0x140B
          *   GL_HALF_FLOAT_ARB = 0x140B == GL_HALF_FLOAT
          *   GL_HALF_FLOAT_NV  = 0x140B == GL_HALF_FLOAT
          *   GL_HALF_FLOAT_OES = 0x8D61 != GL_HALF_FLOAT
          * WebGL handles this specifically with an OES_texture_half_float check.
          */
     },
     {
-        "texture_half_float_linear",
-        310, // OpenGL version
-        300, // OpenGL ES version
-        {
-            GLContext::ARB_half_float_pixel,
-            GLContext::ARB_texture_float,
-            GLContext::NV_half_float,
-            GLContext::OES_texture_half_float_linear,
-            GLContext::Extensions_End
-        }
-    },
-    {
         "texture_non_power_of_two",
         200, // OpenGL version
         300, // OpenGL ES version
         {
             GLContext::ARB_texture_non_power_of_two,
             GLContext::OES_texture_npot,
             GLContext::Extensions_End
         }