Check for deferred saves in SkCanvas::clipShader

Before, in the new clip_shader_nested GM, without the
checkForDeferredSaves() call, the first clipShader() would end up
associated with the original save record, but the intervening scale()
call checked for deferred saves. This meant the second clipShader() was
associated with the new save record and would be removed during the
restore (although the first shader remained).

Change-Id: I62f33b821de810c68f62069201ae3429f520be8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293690
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2 files changed