[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Thu Apr 8 02:09:25 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 193c5f867e3fe1e6b056fbaad3944f8162c95f88
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 4 09:41:30 2010 +0000
2010-03-04 Vangelis Kokkevis <vangelis at chromium.org>
Reviewed by Oliver Hunt.
Update existing test to check that getUniformLocation() returns
null if the uniform requested is not found.
https://bugs.webkit.org/show_bug.cgi?id=34669
* fast/canvas/webgl/script-tests/uniform-location.js:
* fast/canvas/webgl/uniform-location-expected.txt:
2010-03-04 Vangelis Kokkevis <vangelis at chromium.org>
Reviewed by Oliver Hunt.
getUniformLocation() now returns null if uniform requested
is not found.
https://bugs.webkit.org/show_bug.cgi?id=34669
Test:LayoutTests/fast/canvas/webgl/uniform-location.html
(added missing test)
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniformLocation):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 544dac8..c1b378e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-04 Vangelis Kokkevis <vangelis at chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Update existing test to check that getUniformLocation() returns
+ null if the uniform requested is not found.
+ https://bugs.webkit.org/show_bug.cgi?id=34669
+
+ * fast/canvas/webgl/script-tests/uniform-location.js:
+ * fast/canvas/webgl/uniform-location-expected.txt:
+
2010-03-04 John Abd-El-Malek <jam at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/canvas/webgl/script-tests/uniform-location.js b/LayoutTests/fast/canvas/webgl/script-tests/uniform-location.js
index 87ecf7b..70f1bd6 100644
--- a/LayoutTests/fast/canvas/webgl/script-tests/uniform-location.js
+++ b/LayoutTests/fast/canvas/webgl/script-tests/uniform-location.js
@@ -1,4 +1,4 @@
-description("Tests calling WebGL APIs with objects from other contexts");
+description("Tests WebGL APIs related to shader uniforms");
var contextA = create3DDebugContext();
var contextB = create3DDebugContext();
@@ -33,4 +33,6 @@ shouldBeUndefined("contextA.useProgram(programV)");
shouldBeUndefined("contextA.uniform4fv(locationVec4, vec)");
shouldBe("contextA.getUniform(programV, locationVec4)", "vec");
+shouldBeNull("contextA.getUniformLocation(programV, \"IDontExist\")");
+
successfullyParsed = true;
diff --git a/LayoutTests/fast/canvas/webgl/uniform-location-expected.txt b/LayoutTests/fast/canvas/webgl/uniform-location-expected.txt
index df15eb5..1da4969 100644
--- a/LayoutTests/fast/canvas/webgl/uniform-location-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/uniform-location-expected.txt
@@ -1,4 +1,4 @@
-Tests calling WebGL APIs with objects from other contexts
+Tests WebGL APIs related to shader uniforms
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -15,6 +15,7 @@ PASS contextA.getUniform(programS, locationArray0) is 4.0
PASS contextA.useProgram(programV) is undefined.
PASS contextA.uniform4fv(locationVec4, vec) is undefined.
PASS contextA.getUniform(programV, locationVec4) is vec
+PASS contextA.getUniformLocation(programV, "IDontExist") is null
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2994a35..b7485e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-04 Vangelis Kokkevis <vangelis at chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ getUniformLocation() now returns null if uniform requested
+ is not found.
+ https://bugs.webkit.org/show_bug.cgi?id=34669
+
+ Test:LayoutTests/fast/canvas/webgl/uniform-location.html
+ (added missing test)
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getUniformLocation):
+
2010-03-04 John Abd-El-Malek <jam at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 5e908a9..4059d7f 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -1399,7 +1399,10 @@ PassRefPtr<WebGLUniformLocation> WebGLRenderingContext::getUniformLocation(WebGL
return 0;
}
WebGLStateRestorer(this, false);
- return WebGLUniformLocation::create(program, m_context->getUniformLocation(program, name));
+ long uniformLocation = m_context->getUniformLocation(program, name);
+ if (uniformLocation == -1)
+ return 0;
+ return WebGLUniformLocation::create(program, uniformLocation);
}
WebGLGetInfo WebGLRenderingContext::getVertexAttrib(unsigned long index, unsigned long pname, ExceptionCode& ec)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list