[DisplayList] Remove unnecessary DisplayListBuilder as DlOpReceiver accesses#54969
Conversation
gaaclarke
left a comment
There was a problem hiding this comment.
Nice, can we hide that API? maybe only give it access to a friend?
It is already only accessible via It's just that we had 100+ unit tests written from before DlCanvas existed and which were using it because of "laziness" rather than "necessity". I was having to modify them all when I edited DlOpReceiver to use DL/Impeller objects and asked myself why I was updating them rather than moving them to DlBuilder/Canvas. Some of that work is just being punted down the road here because I will eventually de-skia-fy DlCanvas anyway, but in that case I will be doing it incrementally - DlOpReceiver I want to just do in one fell swoop. |
flutter/engine@a156e71...e042ff5 2024-09-05 [email protected] [DisplayList] Remove unnecessary DisplayListBuilder as DlOpReceiver accesses (flutter/engine#54969) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes flutter/flutter#144070
There is a mechanism by which you can access a DisplayListBuilder as if it were a DlOpReceiver for dispatching one DisplayList into another.
This mechanism also resembles the legacy way in which one would write graphics snippets prior to the creation of the DlCanvas interface and so we have dozens of old unit tests which were written to test the Builder class by filling it with commands in the Receiver/Dispatcher format. This type of access is obsolete and maintaining the ability for arbitrary code to talk to a Builder in that manner is getting in the way of future work.
This PR rewrites over 100 of such unit tests to use the standard DlCanvas-style interface to record operations into a Builder, leaving only a dozen or so cases of internal state tests that still inject ops directly to test the internal state keeping.