-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
We are approaching a time when the entire tree will be rendered through DisplayList objects and so when needed we should be modifying the sub-systems to work with both SkCanvas and DisplayListBuilder.
Right now for those parts of the system that speak to SkCanvas we recapture their rendering operations into a DisplayList using a DisplayListCanvasRecorder, but one of the pieces of that strategy that causes some churn in the created DisplayList objects is the drawImage() method which receives an SkImage and converts it into a new unique DlImage by wrapping it. So, each DisplayList that was generated using a drawImage() object will not compare to an identical DisplayList generated separately because the identities of the sk_sp<DlImage> will be different.
The only place this currently affects us is when doing rendering testing in unit tests and looking for identical DisplayLists. If the rendering involved a cache draw, then the two DisplayLists won't match.
If the RasterCache stored its images as DlImage and if draw methods took a(n optional) DisplayListBuilder to draw into, then these unit tests could see a consistent, and comparable, DisplayList.