OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "gpu/command_buffer/service/service_utils.h" |
| 6 |
| 7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 8 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 9 |
| 10 namespace gpu { |
| 11 namespace gles2 { |
| 12 |
| 13 gl::GLContextAttribs GenerateGLContextAttribs( |
| 14 const ContextCreationAttribHelper& attribs_helper, |
| 15 const GpuPreferences& gpu_preferences) { |
| 16 gl::GLContextAttribs attribs; |
| 17 attribs.gpu_preference = attribs_helper.gpu_preference; |
| 18 attribs.bind_generates_resource = attribs_helper.bind_generates_resource; |
| 19 attribs.webgl_compatibility_context = |
| 20 gpu_preferences.use_passthrough_cmd_decoder && |
| 21 IsWebGLContextType(attribs_helper.context_type); |
| 22 return attribs; |
| 23 } |
| 24 |
| 25 } // namespace gles2 |
| 26 } // namespace gpu |
OLD | NEW |