Bug 1255434 - Add getGLError after each draw call. r=jgilbert
authorMorris Tseng <mtseng@mozilla.com>
Wed, 13 Apr 2016 16:53:26 +0800
changeset 330872 b15639b50f9f6a5ace4c82864314702cfa217f65
parent 330871 1c23caab8a0d0cc212b9675598afbffbbc2d0588
child 330873 0022241652693598c24facb8ce9a5c9c5f6b100c
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1255434
milestone48.0a1
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
Bug 1255434 - Add getGLError after each draw call. r=jgilbert
dom/canvas/test/offscreencanvas.js
--- a/dom/canvas/test/offscreencanvas.js
+++ b/dom/canvas/test/offscreencanvas.js
@@ -165,22 +165,27 @@ function createDrawFunc(canvas) {
   return function(prefix, needCommitFrame) {
     if (prefix) {
       prefix = "[" + prefix + "] ";
     } else {
       prefix = "";
     }
 
     gl.viewport(0, 0, canvas.width, canvas.height);
+    checkGLError(prefix + "[viewport]");
 
     preDraw(prefix);
+    checkGLError(prefix + "[predraw]");
     gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+    checkGLError(prefix + "[drawarrays]");
     postDraw(prefix);
+    checkGLError(prefix + "[postdraw]");
     if (needCommitFrame) {
       gl.commit();
+      checkGLError(prefix + "[commit]");
     }
     checkGLError(prefix);
   };
 }
 
 /* entry point */
 function entryFunction(testStr, subtests, offscreenCanvas) {
   var test = testStr;