skia2/include
Michael Ludwig 887ac49f9e Always use AutoLayerForImageFilter
This definitely simplifies the drawing code, but always copies the input
SkPaint so that it can be modified if necessary. If we get perf hits, we
can just revert this. We could keep it using a copy-on-write, but with
this change, I believe we've removed the majority of instances of
SkCopyOnWrite<SkPaint> inside SkCanvas. There's just one LatticePaint
struct that's overly complex for what it does that I can clean up next.

A middle ground would be to keep the copy-on-write behavior, but drop
the branch on image-filter. Given the lack of perf needle movement on
some of the other simplifications that avoided technically unnecessary
paint copies, I doubt it's worth the complexity.

As part of this change, since the draw calls no longer branch based on
the presence of an image filter, the AutoLayerForImageFilter takes over
calling predrawNotify() in its various forms. We don't have to follow
through with that, if we'd rather have the notification be called out
explicitly within the draw call itself. I've found it easy to forget to
call predrawNotify(), or keep it in the right place while updating draws
so I may be biased.

Bug: skia:10987
Change-Id: I5204c175aae691f82cc45f3d9a04ef64dee5d80f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342920
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-12-15 15:38:19 +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 Expose more info in SkCodec::FrameInfo 2020-12-02 22:37:20 +00:00
config Track vulkan memory allocations in UMA. 2020-10-29 15:24:23 +00:00
core Always use AutoLayerForImageFilter 2020-12-15 15:38:19 +00:00
docs Add appendNodeIdArray to avoid code duplication. 2020-06-23 14:25:33 +00:00
effects Preserve dithering for SkImageFilters::Shader 2020-11-25 19:41:37 +00:00
encode Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
gpu GrRenderTargetContext->GrSurfaceDrawContext 2020-12-10 18:51:19 +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 GrRenderTargetContext->GrSurfaceDrawContext 2020-12-10 18:51:19 +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 Remove dead code (from old flags) 2020-12-11 02:35:49 +00:00