Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Unified Diff: tools/PictureBenchmark.cpp

Issue 117583002: Update bench pictures to time image decode & upload costs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed comment Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/PictureBenchmark.h ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureBenchmark.cpp
===================================================================
--- tools/PictureBenchmark.cpp (revision 12709)
+++ tools/PictureBenchmark.cpp (working copy)
@@ -22,6 +22,7 @@
, fTimerResult(TimerData::kAvg_Result)
, fTimerTypes(0)
, fTimeIndividualTiles(false)
+, fPurgeDecodedTex(false)
{}
PictureBenchmark::~PictureBenchmark() {
@@ -79,6 +80,10 @@
fRenderer->render(NULL);
fRenderer->resetState(true);
+ if (fPurgeDecodedTex) {
+ fRenderer->purgeTextures();
+ }
+
bool usingGpu = false;
#if SK_SUPPORT_GPU
usingGpu = fRenderer->isUsingGpuDevice();
@@ -140,6 +145,10 @@
tiledRenderer->resetState(false);
perTileTimer->end();
SkAssertResult(perTileTimerData.appendTimes(perTileTimer.get()));
+
+ if (fPurgeDecodedTex) {
+ fRenderer->purgeTextures();
+ }
}
longRunningTimer->truncatedEnd();
tiledRenderer->resetState(true);
@@ -160,7 +169,9 @@
#if 0
this->logProgress(result.c_str());
#endif
-
+ if (fPurgeDecodedTex) {
+ configName.append(" <withPurging>");
+ }
configName.append(" <averaged>");
SkString longRunningResult = longRunningTimerData.getResult(
tiledRenderer->getNormalTimeFormat().c_str(),
@@ -186,6 +197,10 @@
perRunTimer->end();
SkAssertResult(perRunTimerData.appendTimes(perRunTimer.get()));
+
+ if (fPurgeDecodedTex) {
+ fRenderer->purgeTextures();
+ }
}
longRunningTimer->truncatedEnd();
fRenderer->resetState(true);
@@ -193,6 +208,9 @@
SkAssertResult(longRunningTimerData.appendTimes(longRunningTimer.get()));
SkString configName = fRenderer->getConfigName();
+ if (fPurgeDecodedTex) {
+ configName.append(" <withPurging>");
+ }
// Beware - since the per-run-timer doesn't ever include a glFinish it can
// report a lower time then the long-running-timer
« no previous file with comments | « tools/PictureBenchmark.h ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698