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

Unified Diff: tools/VisualBench.h

Issue 1183193003: Load visualbench pictures one at a time. (Closed) Base URL: https://skia.googlesource.com/skia.git@stuff
Patch Set: reupload? Created 5 years, 6 months 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 | « no previous file | tools/VisualBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench.h
diff --git a/tools/VisualBench.h b/tools/VisualBench.h
index 13fc85c6b8473ca9096addfe47f530aa84ab2ce6..9d7b946afec9598b6e0b82850c494f219ef9d39a 100644
--- a/tools/VisualBench.h
+++ b/tools/VisualBench.h
@@ -12,6 +12,7 @@
#include "SkWindow.h"
#include "SkPicture.h"
+#include "SkString.h"
#include "SkSurface.h"
#include "Timer.h"
#include "gl/SkGLContext.h"
@@ -43,11 +44,12 @@ private:
void setupRenderTarget();
bool onHandleChar(SkUnichar unichar) override;
void printStats();
- inline void timePicture(SkCanvas*);
+ bool loadPicture();
+ bool advanceRecordIfNecessary();
inline void renderFrame(SkCanvas*);
- struct Timing {
- SkString fName;
+ struct Record {
+ SkString fFilename;
SkTArray<double> fMeasurements;
};
@@ -57,10 +59,10 @@ private:
};
int fLoop;
- int fCurrentPicture;
+ int fCurrentPictureIdx;
+ SkAutoTUnref<SkPicture> fPicture;
int fCurrentSample;
- SkTArray<Timing> fTimings;
- SkTArray<SkPicture*> fPictures;
+ SkTArray<Record> fRecords;
WallTimer fTimer;
State fState;
« no previous file with comments | « no previous file | tools/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698