Backed out changeset 31879b3fdce3 (bug 1248580) for build bustage. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 25 May 2016 14:15:41 +0200
changeset 337965 6fed93907a39069b9db866890dd49ccc7e09a176
parent 337964 534f9ffd36da1646e7eb0e32a3fd73df299f28d9
child 337966 0edb406418261a3b078bab4f108a4948a13dd46f
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1248580
milestone49.0a1
backs out31879b3fdce353c5034e9a57367b3b343ecf3373
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 31879b3fdce3 (bug 1248580) for build bustage. r=backout on a CLOSED TREE
dom/canvas/WebGLContextValidate.cpp
dom/canvas/WebGLProgram.cpp
dom/canvas/WebGLUniformLocation.cpp
dom/canvas/WebGLUniformLocation.h
--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -490,20 +490,19 @@ WebGLContext::ValidateUniformArraySetter
         return false;
 
     if (!loc->ValidateSizeAndType(setterElemSize, setterType, this, funcName))
         return false;
 
     if (!loc->ValidateArrayLength(setterElemSize, setterArraySize, this, funcName))
         return false;
 
-    MOZ_ASSERT(loc->mActiveInfo->mElemCount > loc->mArrayIndex);
-    size_t uniformElemCount = loc->mActiveInfo->mElemCount - loc->mArrayIndex;
     *out_rawLoc = loc->mLoc;
-    *out_numElementsToUpload = std::min(uniformElemCount, setterArraySize / setterElemSize);
+    *out_numElementsToUpload = std::min((size_t)loc->mActiveInfo->mElemCount,
+                                        setterArraySize / setterElemSize);
     return true;
 }
 
 bool
 WebGLContext::ValidateUniformMatrixArraySetter(WebGLUniformLocation* loc,
                                                uint8_t setterCols,
                                                uint8_t setterRows,
                                                GLenum setterType,
--- a/dom/canvas/WebGLProgram.cpp
+++ b/dom/canvas/WebGLProgram.cpp
@@ -781,24 +781,18 @@ WebGLProgram::GetUniformLocation(const n
     if (!IsLinked()) {
         mContext->ErrorInvalidOperation("getUniformLocation: `program` must be linked.");
         return nullptr;
     }
 
     const NS_LossyConvertUTF16toASCII userName(userName_wide);
 
     nsDependentCString baseUserName;
-    bool isArray = false;
-    // GLES 2.0.25, Section 2.10, p35
-    // If the the uniform location is an array, then the location of the first
-    // element of that array can be retrieved by either using the name of the
-    // uniform array, or the name of the uniform array appended with "[0]".
-    // The ParseName() can't recognize this rule. So always initialize
-    // arrayIndex with 0.
-    size_t arrayIndex = 0;
+    bool isArray;
+    size_t arrayIndex;
     if (!ParseName(userName, &baseUserName, &isArray, &arrayIndex))
         return nullptr;
 
     const WebGLActiveInfo* activeInfo;
     if (!LinkInfo()->FindUniform(baseUserName, &activeInfo))
         return nullptr;
 
     const nsCString& baseMappedName = activeInfo->mBaseMappedName;
@@ -813,18 +807,17 @@ WebGLProgram::GetUniformLocation(const n
     gl::GLContext* gl = mContext->GL();
     gl->MakeCurrent();
 
     GLint loc = gl->fGetUniformLocation(mGLName, mappedName.BeginReading());
     if (loc == -1)
         return nullptr;
 
     RefPtr<WebGLUniformLocation> locObj = new WebGLUniformLocation(mContext, LinkInfo(),
-                                                                   loc, arrayIndex,
-                                                                   activeInfo);
+                                                                     loc, activeInfo);
     return locObj.forget();
 }
 
 void
 WebGLProgram::GetUniformIndices(const dom::Sequence<nsString>& uniformNames,
                                 dom::Nullable< nsTArray<GLuint> >& retval) const
 {
     size_t count = uniformNames.Length();
--- a/dom/canvas/WebGLUniformLocation.cpp
+++ b/dom/canvas/WebGLUniformLocation.cpp
@@ -11,23 +11,20 @@
 #include "WebGLActiveInfo.h"
 #include "WebGLContext.h"
 #include "WebGLProgram.h"
 
 namespace mozilla {
 
 WebGLUniformLocation::WebGLUniformLocation(WebGLContext* webgl,
                                            const webgl::LinkedProgramInfo* linkInfo,
-                                           GLuint loc,
-                                           size_t arrayIndex,
-                                           const WebGLActiveInfo* activeInfo)
+                                           GLuint loc, const WebGLActiveInfo* activeInfo)
     : WebGLContextBoundObject(webgl)
     , mLinkInfo(linkInfo)
     , mLoc(loc)
-    , mArrayIndex(arrayIndex)
     , mActiveInfo(activeInfo)
 { }
 
 WebGLUniformLocation::~WebGLUniformLocation()
 { }
 
 bool
 WebGLUniformLocation::ValidateForProgram(WebGLProgram* prog, WebGLContext* webgl,
--- a/dom/canvas/WebGLUniformLocation.h
+++ b/dom/canvas/WebGLUniformLocation.h
@@ -36,21 +36,20 @@ public:
     virtual JSObject* WrapObject(JSContext* js, JS::Handle<JSObject*> givenProto) override;
 
     WebGLContext* GetParentObject() const {
         return mContext;
     }
 
     const WeakPtr<const webgl::LinkedProgramInfo> mLinkInfo;
     const GLuint mLoc;
-    const size_t mArrayIndex;
     const WebGLActiveInfo* const mActiveInfo;
 
     WebGLUniformLocation(WebGLContext* webgl, const webgl::LinkedProgramInfo* linkInfo,
-                         GLuint loc, size_t arrayIndex, const WebGLActiveInfo* activeInfo);
+                         GLuint loc, const WebGLActiveInfo* activeInfo);
 
     bool ValidateForProgram(WebGLProgram* prog, WebGLContext* webgl,
                             const char* funcName) const;
     bool ValidateSamplerSetter(GLint value, WebGLContext* webgl,
                                const char* funcName) const;
     bool ValidateSizeAndType(uint8_t setterElemSize, GLenum setterType,
                              WebGLContext* webgl, const char* funcName) const;
     bool ValidateArrayLength(uint8_t setterElemSize, size_t setterArraySize,