Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 1325433003: command_buffer: Add support for creating non-WebGL ES 3 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_utils.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 31d0c67896baa10b4285fc365e6393ad26f6ad25..9d475af30c3b491eb6c3ed657c992af1689ce7d5 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -1271,7 +1271,7 @@ const int32 kBufferDestroyed = 0x3095; // EGL_BUFFER_DESTROYED
const int32 kBindGeneratesResource = 0x10000;
const int32 kFailIfMajorPerfCaveat = 0x10001;
const int32 kLoseContextWhenOutOfMemory = 0x10002;
-const int32 kWebGLVersion = 0x10003;
+const int32 kContextType = 0x10003;
} // namespace
@@ -1288,8 +1288,7 @@ ContextCreationAttribHelper::ContextCreationAttribHelper()
bind_generates_resource(true),
fail_if_major_perf_caveat(false),
lose_context_when_out_of_memory(false),
- webgl_version(0) {
-}
+ context_type(CONTEXT_TYPE_OPENGLES2) {}
void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) const {
if (alpha_size != -1) {
@@ -1332,8 +1331,8 @@ void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) const {
attribs->push_back(fail_if_major_perf_caveat ? 1 : 0);
attribs->push_back(kLoseContextWhenOutOfMemory);
attribs->push_back(lose_context_when_out_of_memory ? 1 : 0);
- attribs->push_back(kWebGLVersion);
- attribs->push_back(webgl_version);
+ attribs->push_back(kContextType);
+ attribs->push_back(context_type);
attribs->push_back(kNone);
}
@@ -1388,8 +1387,8 @@ bool ContextCreationAttribHelper::Parse(const std::vector<int32>& attribs) {
case kLoseContextWhenOutOfMemory:
lose_context_when_out_of_memory = value != 0;
break;
- case kWebGLVersion:
- webgl_version = value;
+ case kContextType:
+ context_type = static_cast<ContextType>(value);
break;
case kNone:
// Terminate list, even if more attributes.

Powered by Google App Engine
This is Rietveld 408576698