This reverts commit c416fe99ee0ddb464ca85c0b336d679ea626a03c.
Now we shouldn't break the engine build as https://chromium-review.googlesource.com/c/chromium/tools/build/+/1480746 is landed. The golden test is disabled by default and we'll enable it later in our recipe and test it in presubmit tests.
This breaks the Linux build with:
```
[ RUN ] PerformanceOverlayLayer.Gold
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
Actual: false
Expected: true
Golden file not found: "/b/s/w/ir/k/src/flutter/testing/resources"/performance_overlay_gold.png.
Please either set --golden-dir, or make sure that the unit test is run from the right directory (e.g., flutter/engine/src).
```
This reverts commit 3534a2c4cdfa35f921e99466013c7c8b3f03a8c3.
Reverting this broke the flow tests for the performance overlay:
```
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
Actual: false
Expected: true
```
This reverts commit ad96de250ecc47a7c26134ad434150199539b00b.
* Revert "Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)"
This reverts commit 284016b1e1d6e8badec99cbff907ddb900cd27c4.
* Add command line args for golden dir and font file
Behavior (visual) changes should be very minor. Things that are to be expected:
* A few things were not color managed correctly by the transform canvas (color emoji, some color filters). Those will be handled correctly with the tagged surfaces (although we're always transforming to sRGB, so nothing should change until we target a wider gamut).
* Image filtering will happen in the source color space, rather than the destination. Very minor.
* The transform canvas did caching of images in the destination color space. Now, the conversion happens at draw time. If there are performance issues, images can be pre-converted to the destination with makeColorSpace().
Building image encoding into the engine bloated the
binary size. This change will return raw bytes, and
callers who use this functionality can take on the
dependency on image encoding in their apps (via a
Dart package or a platform plugin).
Fixes https://github.com/flutter/flutter/issues/16537