DescriptionAdd RendererFactorySelector
There are 4 types of renderers that are used by WMPI directly, with a
potential fifth type in the works. Currently, a single RendererFactory
is chosen at WMPI creation time, and bound for the lifetime of WMPI.
However, there is a growing need to allow the smooth transition between
the use of different renderer types, after WMPI’s creation.
This CL introduces the RendererFactorySelector, which will allow us to
choose between different RendererFactory types at runtime. Its purpose
is to aggregate the signals and centralize the logic necessary to choose
which RendererFactory should be used when creating a new Renderer.
The interface is still extremelly simple, but it is expected to grow
as the number of concurrent RendererFactory types grows. In other words,
if there are 3+ renderer factories at play, some complexity is
inevitable, and the right place for that complexity to live is in the
RendererFactorySelector.
NOTE: The RendererFactorySelector uses a FactoryType enum as a key, in
order to avoid having to take dependencies on different (sometimes
platform specific) RendererFactories.
BUG=663503
Review-Url: https://codereview.chromium.org/2711153006
Cr-Commit-Position: refs/heads/master@{#466837}
Committed: https://chromium.googlesource.com/chromium/src/+/70d2a00a72c50c344436f139b2a3f5c09ec337bf
Patch Set 1 #Patch Set 2 : Rebase #Patch Set 3 : Added UTs #
Total comments: 1
Patch Set 4 : Typo #
Total comments: 12
Patch Set 5 : Addressed comments #Patch Set 6 : Removed flat_map. Temp fix of -Wsometimes-initialized #
Dependent Patchsets: Messages
Total messages: 32 (16 generated)
|