skia/skia/1639728073bd5380408f5ae1be8f629b638bb961 [graphite] Consolidate kClear blends to kSrc w/ transparent color
It is convenient to consolidate the number of cases that will end up
triggering disabled HW blending. Before this CL, there were 4 scenarios:
1. Clear 2. Src 3. DstOut with opaque 4. SrcOver with opaque
This change maps Clear to be Src with a transparent black solid color.
This reduces the number of pipelines required (no more Clear blend used)
and avoids the issue where you could create a Clear pipeline with lots
of arbitrary effects that are ignored by the final blend.
This change removes the optimization for DstOut with opaque; it seems
unlikely to occur in practice, and if it did, we can justify keeping it
as the original pipeline assuming that it's part of a transient
animation that briefly becomes opaque.
In follow up CLs, we'll shift logic around such that SrcOver+opaque will
actually switch to Src in a number of situations, prioritizing being
able to disable HW blending vs. reducing pipeline switches.
Bug: b/478239991
Change-Id: If70db993bfa729420a0c99b298b1e508a6858b48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1204016
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
4 files changed