[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
eric at webkit.org
eric at webkit.org
Fri Feb 26 22:17:14 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit e34b532bacf2f771b8de55b328de480a79feb734
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 10 23:04:56 2010 +0000
2010-02-10 Kenneth Russell <kbr at google.com>
Reviewed by Oliver Hunt.
Remove automatic viewport resizing
https://bugs.webkit.org/show_bug.cgi?id=34766
Removed automatic viewport resizing per conclusions on the WebGL
mailing list. Added test verifying new behavior and updated a
couple of previous tests failing after this change.
* fast/canvas/webgl/gl-get-calls-expected.txt:
* fast/canvas/webgl/gl-get-calls.html:
* fast/canvas/webgl/texImage2DImageDataTest.html:
* fast/canvas/webgl/viewport-unchanged-upon-resize-expected.txt: Added.
* fast/canvas/webgl/viewport-unchanged-upon-resize.html: Added.
2010-02-10 Kenneth Russell <kbr at google.com>
Reviewed by Oliver Hunt.
Remove automatic viewport resizing
https://bugs.webkit.org/show_bug.cgi?id=34766
Removed automatic viewport resizing per conclusions on the WebGL
mailing list. Added test verifying new behavior and updated a
couple of previous tests failing after this change.
Test: fast/canvas/webgl/viewport-unchanged-upon-resize.html
* platform/graphics/mac/GraphicsContext3DMac.cpp:
(WebCore::GraphicsContext3D::reshape):
2010-02-10 Kenneth Russell <kbr at google.com>
Reviewed by Oliver Hunt.
Remove automatic viewport resizing
https://bugs.webkit.org/show_bug.cgi?id=34766
Removed automatic viewport resizing per conclusions on the WebGL
mailing list. Added test verifying new behavior and updated a
couple of previous tests failing after this change.
* src/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3DInternal::reshape):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3d5e9cd..a509b9f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-02-10 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Remove automatic viewport resizing
+ https://bugs.webkit.org/show_bug.cgi?id=34766
+
+ Removed automatic viewport resizing per conclusions on the WebGL
+ mailing list. Added test verifying new behavior and updated a
+ couple of previous tests failing after this change.
+
+ * fast/canvas/webgl/gl-get-calls-expected.txt:
+ * fast/canvas/webgl/gl-get-calls.html:
+ * fast/canvas/webgl/texImage2DImageDataTest.html:
+ * fast/canvas/webgl/viewport-unchanged-upon-resize-expected.txt: Added.
+ * fast/canvas/webgl/viewport-unchanged-upon-resize.html: Added.
+
2010-02-10 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt b/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt
index ad80582..c844c83 100644
--- a/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt
@@ -63,7 +63,7 @@ PASS context.getParameter(context.STENCIL_REF) is 0
PASS context.getParameter(context.STENCIL_TEST) is false
PASS context.getParameter(context.TEXTURE_BINDING_2D) is null
PASS context.getParameter(context.TEXTURE_BINDING_CUBE_MAP) is null
-PASS context.getParameter(context.VIEWPORT) is [0, 0, 2, 2]
+PASS context.getParameter(context.VIEWPORT) is [0, 0, 0, 0]
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/canvas/webgl/gl-get-calls.html b/LayoutTests/fast/canvas/webgl/gl-get-calls.html
index 955704a..67a0784 100644
--- a/LayoutTests/fast/canvas/webgl/gl-get-calls.html
+++ b/LayoutTests/fast/canvas/webgl/gl-get-calls.html
@@ -94,7 +94,7 @@ else {
//shouldBe('context.getParameter(context.STENCIL_WRITEMASK)', '0xFFFFFFFF');
shouldBe('context.getParameter(context.TEXTURE_BINDING_2D)', 'null');
shouldBe('context.getParameter(context.TEXTURE_BINDING_CUBE_MAP)', 'null');
- shouldBe('context.getParameter(context.VIEWPORT)', '[0, 0, 2, 2]');
+ shouldBe('context.getParameter(context.VIEWPORT)', '[0, 0, 0, 0]');
}
debug("");
diff --git a/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html b/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html
index 560ab62..25b0765 100644
--- a/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html
+++ b/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html
@@ -59,6 +59,7 @@
context2d.fillRect(0,0,64,64);
gl = initWebGL("example", "vshader", "fshader", [ "vPosition", "vTexCoord0"], [ 1, 0, 1, 1 ], 100);
+ gl.viewport(0, 0, 64, 64);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
var vertexObject = gl.createBuffer();
diff --git a/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize-expected.txt b/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize-expected.txt
new file mode 100644
index 0000000..41a4357
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize-expected.txt
@@ -0,0 +1,10 @@
+Verifies that GL viewport does not change when canvas is resized
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+Regression test for https://bugs.webkit.org/show_bug.cgi?id=34766 : Remove automatic viewport resizing
+PASS Viewport correctly did not change size during canvas resize
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html b/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html
new file mode 100644
index 0000000..2ad9f17
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html
@@ -0,0 +1,98 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="resources/webgl-test.js"></script>
+<script src="resources/utils3d.js"> </script>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 g_Position;
+
+void main()
+{
+ gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+</head>
+<body>
+<canvas id="example" width="4px" height="4px"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+description('Verifies that GL viewport does not change when canvas is resized');
+
+debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34766">https://bugs.webkit.org/show_bug.cgi?id=34766</a> : <code>Remove automatic viewport resizing</code>');
+
+var gl = initWebGL("example", "vshader", "fshader", [ "g_Position" ], [ 0, 0, 1, 1 ], 1);
+
+gl.viewport(0, 0, 4, 4);
+
+var vertices = new WebGLFloatArray([
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0]);
+var vbo = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+// Clear and set up
+gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+gl.useProgram(gl.program);
+// Draw the triangle pair to the frame buffer
+gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+// Ensure that the frame buffer is red at the sampled pixel
+var buf = gl.readPixels(2, 2, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE);
+var passed = true;
+if (buf[0] != 255 ||
+ buf[1] != 0 ||
+ buf[2] != 0 ||
+ buf[3] != 255) {
+ testFailed("Pixel at (2, 2) should have been (255, 0, 0, 255), " +
+ "was (" + buf[0] + ", " + buf[1] + ", " + buf[2] + ", " + buf[3] + ")");
+ passed = false;
+}
+
+if (passed) {
+ // Now resize the canvas
+ var canvas = document.getElementById("example");
+ canvas.width = 8;
+ canvas.height = 8;
+ // Do another render
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ // This time, because we did not change the viewport, it should
+ // still be (0, 0, 4, 4), so only the lower-left quadrant should
+ // have been filled.
+ var buf = gl.readPixels(6, 6, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE);
+ var passed = true;
+ if (buf[0] != 0 ||
+ buf[1] != 0 ||
+ buf[2] != 255 ||
+ buf[3] != 255) {
+ testFailed("Pixel at (6, 6) should have been (0, 0, 255, 255), " +
+ "was (" + buf[0] + ", " + buf[1] + ", " + buf[2] + ", " + buf[3] + ")");
+ passed = false;
+ }
+}
+
+if (passed)
+ testPassed("Viewport correctly did not change size during canvas resize");
+successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c5859e8..069eec6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-10 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Remove automatic viewport resizing
+ https://bugs.webkit.org/show_bug.cgi?id=34766
+
+ Removed automatic viewport resizing per conclusions on the WebGL
+ mailing list. Added test verifying new behavior and updated a
+ couple of previous tests failing after this change.
+
+ Test: fast/canvas/webgl/viewport-unchanged-upon-resize.html
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::reshape):
+
2010-02-10 Ariya Hidayat <ariya.hidayat at gmail.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
index 5e5e1f4..99ad130 100644
--- a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
+++ b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
@@ -223,7 +223,6 @@ void GraphicsContext3D::reshape(int width, int height)
notImplemented();
}
- ::glViewport(0, 0, m_currentWidth, m_currentHeight);
::glClear(GL_COLOR_BUFFER_BIT);
::glFlush();
}
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 23b2154..5df4960 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-10 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Oliver Hunt.
+
+ Remove automatic viewport resizing
+ https://bugs.webkit.org/show_bug.cgi?id=34766
+
+ Removed automatic viewport resizing per conclusions on the WebGL
+ mailing list. Added test verifying new behavior and updated a
+ couple of previous tests failing after this change.
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::reshape):
+
2010-02-10 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 023e4e4..83574da 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -709,7 +709,6 @@ void GraphicsContext3DInternal::reshape(int width, int height)
#endif // FLIP_FRAMEBUFFER_VERTICALLY
glClear(GL_COLOR_BUFFER_BIT);
- viewportImpl(0, 0, width, height);
#if PLATFORM(CG)
// Need to reallocate the client-side backing store.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list