[graphite] Search for layer from last RenderStep, insert remaining steps in reverse order

Searching from the last RenderStep and inserting in reverse order allows
the directional template parameter to searchBinding to be removed (less
code size). Having the last step be the pilot draw for multi-step
renderered draws is also advantageous because that is typically the
shading step, which will have more constrained binding requirements. The
remaining steps that are usually stencil-only will then match in bulk in
the found layer.

This also sets up the BindingList linked-list on Layer to be organized
into two sections, a first "half" for non-shading draws (which can
include the stencil steps of a shaded renderer), and then a second
"half" for shading draws. In later CLs this will be used to end
iterating over the Layer's lists when possible.

Bug: 419535595
Change-Id: I04122548e0d68890c5e7d702003a3f5d82a8609e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1283277
Reviewed-by: Thomas Smith <thomsmit@google.com>
Commit-Queue: Thomas Smith <thomsmit@google.com>
2 files changed