RasterizeAndRecord microbenchmark fix.
Recent changes to the scheduler have revealed a race condition with this benchmark. This benchmark is triggered when we do a frame and DidUpdateLayers is called. After the benchmark completes, the impl will schedule a NotifyDone task on the main thread and the results will be recorded when that task is run. The change made in the scheduler will prioritize BeginMainFrame at set intervals. What was happening in the regression was a race condition between NotifyDone and the next frame. If a frame was run before NotifyDone, it would trigger DidUpdateLayers and the benchmark would run a second time, adding its results to the previous runs results, effectively doubling them and causing the benchmark results to oscillate between two ranges of timing. This change fixes this by checking a boolean that tells us whether the benchmark has already been run before running it. Bug: 1030954 Change-Id: Iade1bc20c0cc43e643293f23a631c11c3ff9653e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1986970Reviewed-by:Philip Rogers <pdr@chromium.org> Commit-Queue: Katie Dillon <kdillon@chromium.org> Cr-Commit-Position: refs/heads/master@{#728695}
Showing
Please register or sign in to comment