#include #include #include #include #include #include #include #define CONTEXT_ES20 #include "GBenchMark.h" const static GLuint renderBufferHeight = 400; const static GLuint renderBufferWidth = 400; extern void prepareCases( std::unordered_map< std::string,std::function canvas, GCanvasContext *mCanvasContext,int width,int height)>> &testCases); int main(int argc, char *argv[]) { std::unordered_map< std::string,std::function canvas, GCanvasContext *mCanvasContext,int width,int height)>> testCases; prepareCases(testCases); GBenchMark becnMarker(renderBufferWidth,renderBufferHeight); becnMarker.intilGLOffScreenEnviroment(); // becnMarker.run("tc_2d_fill",testCases["tc_2d_fill"]); // becnMarker.run("tc_sample_path_arc_rotate",testCases["tc_sample_path_arc_rotate"]); for(auto it=testCases.begin();it!=testCases.end();it++){ becnMarker.run(it->first,it->second); } becnMarker.dumpResult(); }