-
Notifications
You must be signed in to change notification settings - Fork 30.2k
MockRasterCache lacks plumbing to determine if layer subtrees were properly rendered #71173
Description
While fixing flutter/engine#22674 I was looking into writing a more explicit test where we could EXPECT that the proper leaf nodes were rendered into the cache. Unfortunately, MockRasterCache plugs into the RasterCache machinery at such a high level that we bypass the code that was making a mistake here.
I started reimplementing MockRasterCache to have finer grained hooks into the caching process, but I ended up with dozens of lines of code that would refactor the way we cache images. The task was large enough that I thought that it should be done as a separate set of changes.
The goal would be for MockRasterCache to substitute caching surfaces with working SkCanvas implementations that would record what was rendered to the cache and be able to report back on that afterwards for EXPECT testing in a unit test.