Move native paint worklet off thread
This CL moves the paint of the background color off the main thread. Here is the design doc: https://docs.google.com/document/d/1usCnwWs8HsH5FU_185q6MsrZehFmpl5QgbbB4pvHIjI/edit In particular, we follow the infra of paint worklet. When main thread paints, we create a PaintDeferredImage, which is a place holder that does nothing. And then we create a NativePaintWorkletInput that captures necessary info and pass it to the compositor thread. After commit, we ask the compositor thread to use the information from the NativePaintWorkletInput and paint the background color. Once the paint is done, we activate the pending tree. There is no need to add new test, as long as the current test are passing because this CL should not cause any behavior change. Bug: 1139004 Change-Id: Id487ca3c8511e620bcc652e75199f893227a50e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466140 Commit-Queue: Xida Chen <xidachen@chromium.org> Reviewed-by:Robert Flack <flackr@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#828858}
Showing
Please register or sign in to comment