Commit 453728e1 authored by kylechar's avatar kylechar Committed by Commit Bot

Update OOP-D ContextCreationAttribs.

1. Set |stencil_size| to 0 except on Chrome OS. This is copying what
   happens in GpuProcessTransportFactory.
2. Set |lose_context_when_out_of_memory| to true. We can handle lost
   contexts in VizProcessContextProvider now.

Bug: 866486
Change-Id: I5f3b1332616883df9cb7b78b8e46c71fc85dfa70
Reviewed-on: https://chromium-review.googlesource.com/1155651Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579375}
parent 166a5337
...@@ -43,11 +43,21 @@ gpu::ContextCreationAttribs CreateAttributes() { ...@@ -43,11 +43,21 @@ gpu::ContextCreationAttribs CreateAttributes() {
gpu::ContextCreationAttribs attributes; gpu::ContextCreationAttribs attributes;
attributes.alpha_size = -1; attributes.alpha_size = -1;
attributes.depth_size = 0; attributes.depth_size = 0;
#if defined(OS_CHROMEOS)
// Chrome OS uses surfaceless when running on a real device and stencil
// buffers can then be added dynamically so supporting them does not have an
// impact on normal usage. If we are not running on a real Chrome OS device
// but instead on a workstation for development, then stencil support is
// useful as it allows the overdraw feedback debugging feature to be used.
attributes.stencil_size = 8; attributes.stencil_size = 8;
#else
attributes.stencil_size = 0;
#endif
attributes.samples = 0; attributes.samples = 0;
attributes.sample_buffers = 0; attributes.sample_buffers = 0;
attributes.fail_if_major_perf_caveat = false;
attributes.bind_generates_resource = false; attributes.bind_generates_resource = false;
attributes.fail_if_major_perf_caveat = false;
attributes.lose_context_when_out_of_memory = true;
return attributes; return attributes;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment