From 6815ef59d5f034ab55f722b23377b8cf386d963c Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Tue, 14 Jun 2016 09:49:03 -0700 Subject: [PATCH] Bug 1250710 - Add a test. - r=ethlin MozReview-Commit-ID: I6I7lKcjmMp --- dom/canvas/WebGL2ContextBuffers.cpp | 2 + dom/canvas/moz.build | 4 +- dom/canvas/test/webgl-mochitest/mochitest.ini | 1 + .../test_pixel_pack_buffer.html | 285 ++++++++++++++++++ 4 files changed, 290 insertions(+), 2 deletions(-) create mode 100644 dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html diff --git a/dom/canvas/WebGL2ContextBuffers.cpp b/dom/canvas/WebGL2ContextBuffers.cpp index d6cfb6e2e66b..9eacbc36c512 100644 --- a/dom/canvas/WebGL2ContextBuffers.cpp +++ b/dom/canvas/WebGL2ContextBuffers.cpp @@ -233,6 +233,8 @@ WebGL2Context::GetBufferSubDataT(GLenum target, GLintptr offset, const BufferT& memcpy(data.DataAllowShared(), ptr, data.LengthAllowShared()); gl->fUnmapBuffer(target); + //// + if (target == LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER && currentTF) { BindTransformFeedback(LOCAL_GL_TRANSFORM_FEEDBACK, currentTF); } diff --git a/dom/canvas/moz.build b/dom/canvas/moz.build index 25c6321f0bed..c5cf22639d44 100644 --- a/dom/canvas/moz.build +++ b/dom/canvas/moz.build @@ -5,12 +5,12 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. TEST_DIRS += [ - 'compiledtest', + 'compiledtest', 'gtest' ] # Change the following line(s) to avoid bug 1081323 (clobber after changing a manifest): -# * Add a regression test for triangle-then-point rendering. +# * Implement ReadPixel with PBOs. MOCHITEST_MANIFESTS += [ 'test/crash/mochitest.ini', diff --git a/dom/canvas/test/webgl-mochitest/mochitest.ini b/dom/canvas/test/webgl-mochitest/mochitest.ini index de758565e0fa..c307d1639bb1 100644 --- a/dom/canvas/test/webgl-mochitest/mochitest.ini +++ b/dom/canvas/test/webgl-mochitest/mochitest.ini @@ -71,6 +71,7 @@ fail-if = (os == 'win' && os_version == '5.1') [test_no_arr_points.html] skip-if = android_version == '18' #Android 4.3 aws only; bug 1030942 [test_noprog_draw.html] +[test_pixel_pack_buffer.html] [test_privileged_exts.html] [test_renderer_strings.html] [test_sab_with_webgl.html] diff --git a/dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html b/dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html new file mode 100644 index 000000000000..0f725c3a879a --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html @@ -0,0 +1,285 @@ + + + + + + + + + + +