| 41 | |
| 42 | |
| 43 | static int |
| 44 | executeGLTrim(const std::vector<const char *> & opts, |
| 45 | const char *traceName) { |
| 46 | |
| 47 | std::vector<const char *> command; |
| 48 | os::String glTrimPath = findProgram("gltrim"); |
| 49 | if (glTrimPath.length()) { |
| 50 | command.push_back(glTrimPath); |
| 51 | } else { |
| 52 | command.push_back("gltrim"); |
| 53 | } |
| 54 | |
| 55 | command.insert(command.end(), opts.begin(), opts.end()); |
| 56 | |
| 57 | if (traceName) { |
| 58 | command.push_back(traceName); |
| 59 | } |
| 60 | command.push_back(NULL); |
| 61 | |
| 62 | return os::execute((char * const *)&command[0]); |
| 63 | } |
| 64 | |
| 65 | static const char *synopsis = "Trim an OpenGL trace to a replayable subset of frames"; |
| 66 | |