make legacy shadercontext optional

Current savings : 96K on intel mac

Breaks -- these subclass don't have a pipeline
- emboss
- perlinnoise

For now, shadercontext is still on -- clients must opt-out with SK_DISABLE_LEGACY_SHADERCONTEXT

Bug: skia:
Change-Id: Idd14cae4013e8de92f16b0707f8b8d43bb6d11dd
Reviewed-on: https://skia-review.googlesource.com/c/162362
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/shaders/SkLocalMatrixShader.cpp b/src/shaders/SkLocalMatrixShader.cpp
index 28d7775..e0ca930 100644
--- a/src/shaders/SkLocalMatrixShader.cpp
+++ b/src/shaders/SkLocalMatrixShader.cpp
@@ -35,6 +35,7 @@
     buffer.writeFlattenable(fProxyShader.get());
 }
 
+#ifdef SK_ENABLE_LEGACY_SHADERCONTEXT
 SkShaderBase::Context* SkLocalMatrixShader::onMakeContext(
     const ContextRec& rec, SkArenaAlloc* alloc) const
 {
@@ -48,6 +49,7 @@
 
     return as_SB(fProxyShader)->makeContext(newRec, alloc);
 }
+#endif
 
 SkImage* SkLocalMatrixShader::onIsAImage(SkMatrix* outMatrix, enum TileMode* mode) const {
     SkMatrix imageMatrix;