#include "profiletablemodel.h"
+typedef trace::Profile::Call Call;
typedef trace::Profile::Frame Frame;
typedef trace::Profile::Program Program;
-typedef trace::Profile::CpuCall CpuCall;
-typedef trace::Profile::DrawCall DrawCall;
enum {
COLUMN_PROGRAM,
}
for (std::vector<Program>::const_iterator itr = m_profile->programs.begin(); itr != m_profile->programs.end(); ++itr) {
- ProfileTableRow* row = getRow(itr - m_profile->programs.begin());
+ ProfileTableRow* row = NULL;
const Program& program = *itr;
- for (std::vector<DrawCall>::const_iterator jtr = program.drawCalls.begin(); jtr != program.drawCalls.end(); ++jtr) {
- const DrawCall& call = *jtr;
+ for (std::vector<unsigned>::const_iterator jtr = program.calls.begin(); jtr != program.calls.end(); ++jtr) {
+ const Call& call = m_profile->calls[*jtr];
if (call.cpuStart > m_timeMax) {
break;
continue;
}
+ if (!row) {
+ row = getRow(itr - m_profile->programs.begin());
+ }
+
row->uses++;
row->pixels += call.pixels;
row->gpuTime += call.gpuDuration;
/**
* Get the appropriate call associated with an item in the table
*/
-const DrawCall* ProfileTableModel::getJumpCall(const QModelIndex & index) const {
+const trace::Profile::Call *ProfileTableModel::getJumpCall(const QModelIndex & index) const {
const ProfileTableRow& row = m_rowData[index.row()];
switch(index.column()) {