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

Unified Diff: dm/DMSKPTask.cpp

Issue 549183002: Let .skps have Expectations (i.e. work with -r) too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « dm/DMSKPTask.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSKPTask.cpp
diff --git a/dm/DMSKPTask.cpp b/dm/DMSKPTask.cpp
index ece7e9a716897027298572f832700e9a5a2c3469..9e376e7eb24cd50a9519f4f1af29ff34959d8da4 100644
--- a/dm/DMSKPTask.cpp
+++ b/dm/DMSKPTask.cpp
@@ -1,4 +1,5 @@
#include "DMSKPTask.h"
+#include "DMExpectationsTask.h"
#include "DMUtil.h"
#include "DMWriteTask.h"
@@ -10,8 +11,15 @@ DEFINE_int32(skpMaxHeight, 1000, "Max SKPTask viewport height.");
namespace DM {
-SKPTask::SKPTask(Reporter* r, TaskRunner* tr, const SkPicture* pic, SkString filename)
- : CpuTask(r, tr), fPicture(SkRef(pic)), fName(FileToTaskName(filename)) {}
+SKPTask::SKPTask(Reporter* r,
+ TaskRunner* tr,
+ const Expectations& expectations,
+ const SkPicture* pic,
+ SkString filename)
+ : CpuTask(r, tr)
+ , fPicture(SkRef(pic))
+ , fExpectations(expectations)
+ , fName(FileToTaskName(filename)) {}
void SKPTask::draw() {
const int width = SkTMin(SkScalarCeilToInt(fPicture->cullRect().width()), FLAGS_skpMaxWidth),
@@ -21,6 +29,7 @@ void SKPTask::draw() {
DrawPicture(*fPicture, &bitmap);
this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
+ this->spawnChild(SkNEW_ARGS(ExpectationsTask, (*this, fExpectations, bitmap)));
}
} // namespace DM
« no previous file with comments | « dm/DMSKPTask.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698