summaryrefslogtreecommitdiff
path: root/chromium/gpu/command_buffer/service/service_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/gpu/command_buffer/service/service_utils.cc')
-rw-r--r--chromium/gpu/command_buffer/service/service_utils.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/gpu/command_buffer/service/service_utils.cc b/chromium/gpu/command_buffer/service/service_utils.cc
index e8f2b6195ec..7e86f9f3c16 100644
--- a/chromium/gpu/command_buffer/service/service_utils.cc
+++ b/chromium/gpu/command_buffer/service/service_utils.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/context_group.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "ui/gl/gl_switches.h"
#if defined(USE_EGL)
@@ -31,6 +32,8 @@ gl::GLContextAttribs GenerateGLContextAttribs(
// decoder
attribs.global_texture_share_group = true;
+ attribs.robust_resource_initialization = true;
+
// Request a specific context version instead of always 3.0
if (IsWebGL2OrES3ContextType(attribs_helper.context_type)) {
attribs.client_major_es_version = 3;
@@ -55,6 +58,10 @@ gl::GLContextAttribs GenerateGLContextAttribs(
return attribs;
}
+bool UsePassthroughCommandDecoder(const base::CommandLine* command_line) {
+ return command_line->HasSwitch(switches::kUsePassthroughCmdDecoder);
+}
+
bool PassthroughCommandDecoderSupported() {
#if defined(USE_EGL)
// Using the passthrough command buffer requires that specific ANGLE