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

Unified Diff: tools/PictureBenchmark.cpp

Issue 639013003: Update old tools to allow MultiPictureDraw rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 years, 2 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 | « 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
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index 15b6173aa148ea19c5d477286ec35bd8861a790a..f708f53613232e006d9ef73f16f3ef41dd372380 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -15,15 +15,14 @@
namespace sk_tools {
PictureBenchmark::PictureBenchmark()
-: fRepeats(1)
-, fRenderer(NULL)
-, fTimerResult(TimerData::kAvg_Result)
-, fTimerTypes(0)
-, fTimeIndividualTiles(false)
-, fPurgeDecodedTex(false)
-, fPreprocess(false)
-, fWriter(NULL)
-{}
+ : fRepeats(1)
+ , fRenderer(NULL)
+ , fTimerResult(TimerData::kAvg_Result)
+ , fTimerTypes(0)
+ , fTimeIndividualTiles(false)
+ , fPurgeDecodedTex(false)
+ , fWriter(NULL) {
+}
PictureBenchmark::~PictureBenchmark() {
SkSafeUnref(fRenderer);
@@ -56,7 +55,7 @@ PictureRenderer* PictureBenchmark::setRenderer(sk_tools::PictureRenderer* render
return renderer;
}
-void PictureBenchmark::run(SkPicture* pict) {
+void PictureBenchmark::run(SkPicture* pict, bool useMultiPictureDraw) {
SkASSERT(pict);
if (NULL == pict) {
return;
@@ -67,17 +66,11 @@ void PictureBenchmark::run(SkPicture* pict) {
return;
}
- fRenderer->init(pict, NULL, NULL, NULL, false);
+ fRenderer->init(pict, NULL, NULL, NULL, false, useMultiPictureDraw);
// We throw this away to remove first time effects (such as paging in this program)
fRenderer->setup();
- if (fPreprocess) {
- if (fRenderer->getCanvas()) {
- fRenderer->getCanvas()->EXPERIMENTAL_optimize(fRenderer->getPicture());
- }
- }
-
fRenderer->render(NULL);
fRenderer->resetState(true); // flush, swapBuffers and Finish
« 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