Improve debug trace generation speed by clipping the paint.

When generating a debug trace, we disable most optimizations, pessimize
the SkVM code with many additional instructions, and run the interpreter
instead of the SkVM JIT. Additionally, while under development, viewer
is generally compiled in -O0. All of these changes made it painfully
slow to generate the debug trace of a complex shader, even though we
only care about tracing a single pixel of the paint.

Now, when taking a debug trace, we clip the paint to a small 4x4 area
surrounding the trace coordinate for a single frame. This makes debug
traces run very quickly, even on a modest laptop CPU.

Change-Id: Ibcadc20a8d83a3a241e05408b8af31d61cf03d4c
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482701
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
1 file changed