[dm] Upload old SKPs into a separate "old-skp" Gold corpus.

The goal of this CL is to upload SKPs produced by the Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion into a new "old-skp" Gold corpus. This will make triaging SKPs easier.

Other approaches I considered:

- Define a new --oldSkp flag. Redundant since we can recover this information by looking at the --config flag.
- Define a new "old-skp" value accepted by the --src flag. More complex; requires larger changes in DM.cpp, and changes to the Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion task definition.

Bug: skia:13398
Change-Id: Ie8311e715eee0daf335e277132b7484a46b94489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548076
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Leandro Lovisolo 2022-06-08 01:58:51 +00:00 committed by SkCQ
parent fd86891407
commit 09a20afc9c

View File

@ -1346,10 +1346,26 @@ struct Task {
const SkBitmap* bitmap,
const HashAndEncode* hashAndEncode) {
// Determine whether or not the OldestSupportedSkpVersion extra_config is provided.
bool isOldestSupportedSkp = false;
for (int i = 1; i < FLAGS_key.count(); i += 2) {
if (0 == strcmp(FLAGS_key[i-1], "extra_config") &&
0 == strcmp(FLAGS_key[i], "OldestSupportedSkpVersion")) {
isOldestSupportedSkp = true;
break;
}
}
JsonWriter::BitmapResult result;
result.name = task.src->name();
result.config = task.sink.tag;
result.sourceType = task.src.tag;
// If the OldestSupportedSkpVersion extra_config is provided, override the "skp"
// source_type with "old-skp". This has the effect of grouping the oldest supported SKPs in
// a separate Gold corpus for easier triaging.
if (isOldestSupportedSkp && 0 == strcmp(result.sourceType.c_str(), "skp")) {
result.sourceType = "old-skp";
}
result.sourceOptions = task.src.options;
result.ext = ext;
result.md5 = md5;