forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor context creation parameters into a struct.
This allows for easily adding new parameters to GL context creation, added parameters for creating contexts with EGL_CHROMIUM_create_context_bind_generates_resource and EGL_ANGLE_create_context_webgl_compatibility. Small related fix: disallow create-on-bind for vertex arrays and transform feedbacks in the passthrough command buffer, these objects do not allow create-on-bind by the ES 3.0 spec but the semantics were mistakenly added. BUG=angleproject:1518 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2480373002 Cr-Commit-Position: refs/heads/master@{#431412}
- Loading branch information
Showing
51 changed files
with
291 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "gpu/command_buffer/service/service_utils.h" | ||
|
||
#include "gpu/command_buffer/common/gles2_cmd_utils.h" | ||
#include "gpu/command_buffer/service/gpu_preferences.h" | ||
|
||
namespace gpu { | ||
namespace gles2 { | ||
|
||
gl::GLContextAttribs GenerateGLContextAttribs( | ||
const ContextCreationAttribHelper& attribs_helper, | ||
const GpuPreferences& gpu_preferences) { | ||
gl::GLContextAttribs attribs; | ||
attribs.gpu_preference = attribs_helper.gpu_preference; | ||
if (gpu_preferences.use_passthrough_cmd_decoder) { | ||
attribs.bind_generates_resource = attribs_helper.bind_generates_resource; | ||
attribs.webgl_compatibility_context = | ||
IsWebGLContextType(attribs_helper.context_type); | ||
} | ||
return attribs; | ||
} | ||
|
||
} // namespace gles2 | ||
} // namespace gpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef GPU_COMMAND_BUFFER_SERVICE_SERVICE_UTILS_H_ | ||
#define GPU_COMMAND_BUFFER_SERVICE_SERVICE_UTILS_H_ | ||
|
||
#include "gpu/gpu_export.h" | ||
#include "ui/gl/gl_context.h" | ||
|
||
namespace gpu { | ||
struct GpuPreferences; | ||
|
||
namespace gles2 { | ||
struct ContextCreationAttribHelper; | ||
|
||
GPU_EXPORT gl::GLContextAttribs GenerateGLContextAttribs( | ||
const ContextCreationAttribHelper& attribs_helper, | ||
const GpuPreferences& gpu_preferences); | ||
|
||
} // namespace gles2 | ||
} // namespace gpu | ||
|
||
#endif // GPU_COMMAND_BUFFER_SERVICE_SERVICE_UTILS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.