Bug 1255434 - Add getGLError after each draw call. r=jgilbert
authorMorris Tseng <mtseng@mozilla.com>
Wed, 13 Apr 2016 16:53:26 +0800
changeset 316775 b15639b50f9f6a5ace4c82864314702cfa217f65
parent 316774 1c23caab8a0d0cc212b9675598afbffbbc2d0588
child 316776 0022241652693598c24facb8ce9a5c9c5f6b100c
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1255434
milestone48.0a1
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;