aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-07-24 10:37:19 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-24 15:48:12 +0000
commit97d6a7af8020ab76d6fcbbdc4a7f0beec556f4b7 (patch)
tree01f965330aeea96d33a27342fd10412502ea4f46 /dm/DM.cpp
parentbb155e20182e25a6d4dcedfc698dc133a2543bbd (diff)
Don't write .pdfs in DM on the bots.
They take a long time to upload, and we don't do anything with them. BUG=skia:6821 Change-Id: I16c5fc423953fa3e9d0dcb184ecbbe23f3918357 Reviewed-on: https://skia-review.googlesource.com/26142 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 290f4eb355..94ac7f41b7 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -93,6 +93,8 @@ DEFINE_pathrenderer_flag;
DEFINE_bool(ignoreSigInt, false, "ignore SIGINT signals during test execution");
+DEFINE_string(dont_write, "", "File extensions to skip writing to --writePath."); // See skia:6821
+
using namespace DM;
using sk_gpu_test::GrContextFactory;
using sk_gpu_test::GLTestContext;
@@ -1124,11 +1126,13 @@ struct Task {
if (!FLAGS_writePath.isEmpty()) {
const char* ext = task.sink->fileExtension();
- if (data->getLength()) {
- WriteToDisk(task, md5, ext, data, data->getLength(), nullptr);
- SkASSERT(bitmap.drawsNothing());
- } else if (!bitmap.drawsNothing()) {
- WriteToDisk(task, md5, ext, nullptr, 0, &bitmap);
+ if (!FLAGS_dont_write.contains(ext)) {
+ if (data->getLength()) {
+ WriteToDisk(task, md5, ext, data, data->getLength(), nullptr);
+ SkASSERT(bitmap.drawsNothing());
+ } else if (!bitmap.drawsNothing()) {
+ WriteToDisk(task, md5, ext, nullptr, 0, &bitmap);
+ }
}
}
});