clipShader -- raster implementation

1. pass shader+op down to device
2. bitmapdevice pass it down to rasterclip
3. rasterclip only ever stores at most one shader
   - if there is a ctm, fold that into (another) shader
   - if the op is difference, invert the sense of alpha
   - if there was a previous shader, compose with it
4. pass through to rasterpipelineblitter
5. it prepends the colorPipeline with the clipShader, and stashes its
   results in a buffer (fClipShaderBuffer)
6. in each blit, scale/lerp from the buffer before storing the result

Change-Id: I07c7a8a20b9ae95cdcc9954237d115e63819f7c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275798
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/src/utils/SkCanvasStack.cpp b/src/utils/SkCanvasStack.cpp
index 93612e2..26e5b66 100644
--- a/src/utils/SkCanvasStack.cpp
+++ b/src/utils/SkCanvasStack.cpp
@@ -4,6 +4,8 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+
+#include "include/core/SkShader.h"
 #include "src/utils/SkCanvasStack.h"
 
 SkCanvasStack::SkCanvasStack(int width, int height)
@@ -92,6 +94,11 @@
     this->clipToZOrderedBounds();
 }
 
+void SkCanvasStack::onClipShader(sk_sp<SkShader> cs, SkClipOp op) {
+    this->INHERITED::onClipShader(std::move(cs), op);
+    // we don't change the "bounds" of the clip, so we don't need to update zorder
+}
+
 void SkCanvasStack::onClipRegion(const SkRegion& deviceRgn, SkClipOp op) {
     SkASSERT(fList.count() == fCanvasData.count());
     for (int i = 0; i < fList.count(); ++i) {