DescriptionExpose if we are using swiftshader via WebGraphicsContext3DProvider.
When we are using swiftshader, we are able to make contexts but the
compositor will not use GPU compositing, and WebGL/Canvas should not
be producing GL outputs for it. This is visible via the GPUInfo's
software_rendering flag. Currently WebGL and Canvas get this info
via two different paths, and the compositor makes its decision via
a third. They all end up being the same thing (mostly not racey) but
we can make this more common by just having them all check
|software_rendering|.
This has the additional benefits that:
1) We don't need to do a round trip thru the compositor thread to
determine if we're doing GPU compositing (no more RendererCapability
needed).
2) We don't need a separate method on the Platform API.
3) Canvas2D doesn't have a semi-racey thing where it can check
|software_rendering| on one GpuChannelHost, lose it, then make a
context on a different GpuChannelHost. Now the capability is explicitly
tied to the lifetime of the context, which is what the comment in
Platform tried to warn about.
4) Additionally, have DrawingBuffer check lost context and not try
to produce frames in this scenario since it may end up producing the
wrong mode for the compositor which is already using a new context
with a different mode. (Canvas already does this.)
This helps us eliminate races between cc/webgl/canvas on
making this decision. When the GpuChannelHost is lost, all contexts
become lost when the next code tries to create a context. Since we
now tie the decisions around which mode to use to the context, and
the context is lost when any other part of the system would change
its opinion about what mode to use, they should all agree.
[email protected], [email protected], [email protected]
BUG=606056
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel
Committed: https://crrev.com/4dd43951b9efedb9473e65e8132ee5d8976bc860
Cr-Commit-Position: refs/heads/master@{#413837}
Patch Set 1 #Patch Set 2 : softwarerendering: addmorecomment #
Total comments: 1
Patch Set 3 : softwarerendering: . #
Total comments: 2
Dependent Patchsets: Messages
Total messages: 32 (18 generated)
|