Bug 985685 - DrawRangeElements should call Before/AfterGLDrawCall(). r=kamidphish, a=lsblakk
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 20 Mar 2014 21:20:02 -0700
changeset 191581 760e01dafd959a595c74b12eb7ce3d5ff3e29e14
parent 191580 3cfbc5ffa9681516b70ecb7562e21449c152dbcf
child 191582 ccb24c1157248f3d1b9339cb9293198dcbc89de6
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish, lsblakk
bugs985685
milestone30.0a2
Bug 985685 - DrawRangeElements should call Before/AfterGLDrawCall(). r=kamidphish, a=lsblakk
gfx/gl/GLContext.h
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -2208,39 +2208,59 @@ public:
 
 
 // -----------------------------------------------------------------------------
 // Package XXX_draw_instanced
 public:
     void fDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
     {
         BeforeGLDrawCall();
-        BEFORE_GL_CALL;
-        ASSERT_SYMBOL_PRESENT(fDrawArraysInstanced);
-        mSymbols.fDrawArraysInstanced(mode, first, count, primcount);
-        AFTER_GL_CALL;
+        raw_fDrawArraysInstanced(mode, first, count, primcount);
         AfterGLDrawCall();
     }
 
     void fDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei primcount)
     {
         BeforeGLDrawCall();
+        raw_fDrawElementsInstanced(mode, count, type, indices, primcount);
+        AfterGLDrawCall();
+    }
+
+private:
+    void raw_fDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+    {
+        BEFORE_GL_CALL;
+        ASSERT_SYMBOL_PRESENT(fDrawArraysInstanced);
+        mSymbols.fDrawArraysInstanced(mode, first, count, primcount);
+        AFTER_GL_CALL;
+    }
+
+    void raw_fDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei primcount)
+    {
         BEFORE_GL_CALL;
         ASSERT_SYMBOL_PRESENT(fDrawElementsInstanced);
         mSymbols.fDrawElementsInstanced(mode, count, type, indices, primcount);
         AFTER_GL_CALL;
-        AfterGLDrawCall();
     }
 
 // -----------------------------------------------------------------------------
 // Feature draw_range_elements
 public:
     void fDrawRangeElements(GLenum mode, GLuint start, GLuint end,
                             GLsizei count, GLenum type, const GLvoid* indices)
     {
+        BeforeGLDrawCall();
+        raw_fDrawRangeElements(mode, start, end, count, type, indices);
+        AfterGLDrawCall();
+    }
+
+private:
+    void raw_fDrawRangeElements(GLenum mode, GLuint start, GLuint end,
+                                GLsizei count, GLenum type, const GLvoid* indices)
+    {
         BEFORE_GL_CALL;
         ASSERT_SYMBOL_PRESENT(fDrawRangeElements);
         mSymbols.fDrawRangeElements(mode, start, end, count, type, indices);
         AFTER_GL_CALL;
     }
 
 // -----------------------------------------------------------------------------
 // Package XXX_framebuffer_blit