skia2/include
Michael Ludwig 6c1191d749 Revert "Simplify layer bounds syncing and no-device error handling in SkCanvas::internalSaveLayer"
This reverts commit b27ba538ec.

Reason for revert: causes invalid memory accesses due to replaceClip use, and replaceClip() is probably not the right operation to use
to emulate a layer when no layer was the strategy or failed to allocate.

Original change's description:
> Simplify layer bounds syncing and no-device error handling in SkCanvas::internalSaveLayer
>
> This corrects some subtle bugs that can occur with recording canvas or
> if a device fails to be created for a new layer, where the stashed
> matrix would not be restored properly. Since no new DeviceCM would get
> added in those cases, the canvas' total matrix wouldn't get fixed in the
> paired onRestore() and it would remain dirty for the remainder of the
> canvas's lifetime.
>
> After this change, the underlying SkDevice's bounds are also kept in
> sync with the intent of the saveLayer when kNoLayer_Strategy is used.
> Previously, the bounds would be applied to the canvas' conservative clip
> and quick reject bounds, but the device would remain un-updated. As we
> move towards SkNoPixelsDevice taking over the conservative clip bounds,
> this ensures bounds remain up to date within a saveLayer/restore pair
> even if no layer was allocated.
>
> Change-Id: I5ca389bdd624ea7278106da863a96e9d8f90e2d1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335861
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=mtklein@google.com,bsalomon@google.com,reed@google.com,michaelludwig@google.com

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1151195, chromium:1151270, chromium:1151294, chromium:1151320, chromium:1151322
Change-Id: I9db07916ffc450cc6ecc9188d72bb7c35770a974
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337117
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-11-20 17:10:58 +00:00
..
android Reland "SkAnimatedImage: Use fSampleSize" 2020-11-17 14:07:03 +00:00
c remove unimplemented sk_data_new_empty() 2020-10-29 16:20:06 +00:00
codec Reland "SkAndroidCodec: Support decoding all frames" 2020-11-16 16:55:48 +00:00
config Track vulkan memory allocations in UMA. 2020-10-29 15:24:23 +00:00
core Revert "Simplify layer bounds syncing and no-device error handling in SkCanvas::internalSaveLayer" 2020-11-20 17:10:58 +00:00
docs Add appendNodeIdArray to avoid code duplication. 2020-06-23 14:25:33 +00:00
effects Accept SkFilterQuality in SkImageFilters::Shader 2020-11-13 22:46:20 +00:00
encode Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
gpu Add MTLBinaryArchive support to iOS Metal build 2020-11-19 20:00:30 +00:00
pathops rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
ports Switch to using GrMtlBackendContext for GrDirectContext creation. 2020-11-12 21:03:51 +00:00
private Remove FCLocker::Suspend. 2020-11-17 17:11:03 +00:00
svg [svgcanvas] Add flag to suppress newlines and tabs in XML 2019-08-21 20:17:37 +00:00
third_party Roll skcms from c21106442079 to f73242142ce5 (1 revision) 2020-07-16 21:50:37 +00:00
utils Handle EXIF orientation in SkAnimCodecPlayer 2020-11-12 14:43:47 +00:00