Pass vector<OverlayStrategy> instead of string.
CompositorOverlayCandidateValidatorOzone took a string that was really a comma separated list of overlay strategies. The string was parsed into a list of callbacks that were later used to create the appropriate strategy objects. This CL changes CompositorOverlayCandidateValidatorOzone to take a list of OverlayStrategy enums instead. The enum already existed for UMA and it contains an entry for each overlay strategy. Use the list of enum values to directly instantiate the strategy objects, saving a layer indirection. Move the enum to //components/viz/common so it can be used with IPC later. Also move the code to parse a string containing a comma separated list of strategies, as this is used by the --enable-hardware-overlays flag. Bug: 930173 Change-Id: Ie5d6d501e3117cf4be0fcf29ac8bdf29744041da Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1505839Reviewed-by:danakj <danakj@chromium.org> Reviewed-by:
Robert Kroeger <rjkroege@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#638598}
Showing
Please register or sign in to comment