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

Unified Diff: dm/DM.cpp

Issue 546873002: Start to rework DM JSON handling. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: back to one hash 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 | « no previous file | dm/DMExpectations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index b330445186444d7fd6d93292013ad1a7b2c85691..2be37942dd659e3e2145d5c7a229069ac7647a50 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -6,6 +6,7 @@
#include "SkCommonFlags.h"
#include "SkForceLinking.h"
#include "SkGraphics.h"
+#include "SkOSFile.h"
#include "SkPicture.h"
#include "SkString.h"
#include "SkTaskGroup.h"
@@ -208,19 +209,17 @@ int dm_main() {
GrGLStandard gpuAPI = get_gl_standard();
+ SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::Expectations));
+ if (FLAGS_expectations.count() > 0) {
+ expectations.reset(DM::WriteTask::Expectations::Create(FLAGS_expectations[0]));
+ if (!expectations.get()) {
+ return 1;
+ }
+ }
+
SkTDArray<GMRegistry::Factory> gms;
- SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations));
if (FLAGS_gms) {
append_matching_factories<GM>(GMRegistry::Head(), &gms);
-
- if (FLAGS_expectations.count() > 0) {
- const char* path = FLAGS_expectations[0];
- if (sk_isdir(path)) {
- expectations.reset(SkNEW_ARGS(DM::WriteTask::Expectations, (path)));
- } else {
- expectations.reset(SkNEW_ARGS(DM::JsonExpectations, (path)));
- }
- }
}
SkTDArray<TestRegistry::Factory> tests;
@@ -241,6 +240,8 @@ int dm_main() {
kick_off_skps(skps, &reporter, &tasks);
tasks.wait();
+ DM::WriteTask::DumpJson();
+
SkDebugf("\n");
#ifdef SK_DEBUG
if (FLAGS_portableFonts && FLAGS_reportUsedChars) {
« no previous file with comments | « no previous file | dm/DMExpectations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698