Exemple #1
0
void TestUnpackRowLength::TestAndOutput(int aNumIterations, FILE* aFile)
{
  TestGLRunner tgr(this);
  Duration d = tgr.Run(aNumIterations);
  OutputTestName(aFile);
  fprintf(aFile, ",%d,%d,%d,%d,%d,%.0f\n", mPixelSize, mTextureSize, mAlignment,
          mUploadWidth, mOffset, d.ToMilliseconds());
}
Exemple #2
0
void TestGL::TestAndOutput(int aNumIterations, FILE* aFile)
{
  TestGLRunner tgr(this);
  Duration d = tgr.Run(aNumIterations);
  OutputTestName(aFile);

  int screenSize = 1000 * 1000;
  double numOfUploadsToFillScreen = screenSize/(mTextureSize*mTextureSize);
  double timePerUpload = d.ToMilliseconds() / aNumIterations;
  int timeToFillScreen = (int)(numOfUploadsToFillScreen * timePerUpload);
  fprintf(aFile, ",%10d,%10d,%10d,%10d,%10.0f\n", mPixelSize, mTextureSize, mAlignment, timeToFillScreen,
          d.ToMilliseconds());
}
Exemple #3
0
void
aCatGroup::setLevel( qulonglong newLevel )
{
	if ( !selected() ) return;
	aSQLTable * t = table();
	qulonglong level = t->sysValue("level").toULongLong();
	if ( level == newLevel ) return;
	aCatGroup tgr( obj, db );
	QString query;
	query = QString("UPDATE %1 SET level=%2 WHERE id=%3")\
					.arg(t->tableName).arg(newLevel).arg(getUid());
//	printf("%s\n",(const char*) query);
	db->db()->exec(query);
	if ( !tgr.SelectChild( this ));
		do
		{
			tgr.setLevel( newLevel + 1 );
		}
		while ( tgr.Next() );
}