In SkRuntimeEffect, use a single shared Compiler instance

I've been increasingly concerned about the CPU and memory costs of
creating and holding on to many Compiler instances. Given that they're
use infrequently, having a shared (guarded) instance seems fine.

We can still look at reducing the startup cost of a single instance, but
this removes a large blocker to wider usage of SkRuntimeEffect.

Change-Id: Ia6dc721c73fdf8c9c4c7a8c1af5f350d2c028b22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272466
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2 files changed