guard all SkVMBlitter debug features together

Change-Id: Idcc4d85683f376da92e9c6f88e35bb7df7ecea6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253090
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2019-11-06 10:22:25 -06:00 committed by Skia Commit-Bot
parent 272060a18a
commit da7ef8622e

View File

@ -441,12 +441,6 @@ namespace {
return p;
}
}
#if 0
static std::atomic<int> done{0};
if (0 == done++) {
atexit([]{ SkDebugf("%d calls to done\n", done.load()); });
}
#endif
// We don't really _need_ to rebuild fUniforms here.
// It's just more natural to have effects unconditionally emit them,
// and more natural to rebuild fUniforms than to emit them into a dummy buffer.
@ -457,10 +451,17 @@ namespace {
SkASSERT(fUniforms.buf.size() == prev);
skvm::Program program = builder.done(debug_name(key).c_str());
if (!program.hasJIT() && debug_dump(key)) {
SkDebugf("\nfalling back to interpreter for blitter with this key.\n");
builder.dump();
program.dump();
if (debug_dump(key)) {
static std::atomic<int> done{0};
if (0 == done++) {
atexit([]{ SkDebugf("%d calls to done\n", done.load()); });
}
if (!program.hasJIT()) {
SkDebugf("\nfalling back to interpreter for blitter with this key.\n");
builder.dump();
program.dump();
}
}
return program;
}