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

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

Issue 978593003: Distinguish ES2/ES3 contexts in GPU command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webgl2
Patch Set: rebase Created 5 years, 10 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
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3985193e1167e80c8c53b120b3de60ef559263f1..0950b41df9e5fb70068486747f8e079c03e270dd 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -894,6 +894,7 @@ const int32 kBufferDestroyed = 0x3095; // EGL_BUFFER_DESTROYED
const int32 kBindGeneratesResource = 0x10000;
const int32 kFailIfMajorPerfCaveat = 0x10001;
const int32 kLoseContextWhenOutOfMemory = 0x10002;
+const int32 kES3ContextRequired = 0x10003;
} // namespace
@@ -909,7 +910,8 @@ ContextCreationAttribHelper::ContextCreationAttribHelper()
buffer_preserved(true),
bind_generates_resource(true),
fail_if_major_perf_caveat(false),
- lose_context_when_out_of_memory(false) {}
+ lose_context_when_out_of_memory(false),
+ es3_context_required(false) {}
void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) const {
if (alpha_size != -1) {
@@ -952,6 +954,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(kES3ContextRequired);
+ attribs->push_back(es3_context_required ? 1 : 0);
attribs->push_back(kNone);
}
@@ -1006,6 +1010,9 @@ bool ContextCreationAttribHelper::Parse(const std::vector<int32>& attribs) {
case kLoseContextWhenOutOfMemory:
lose_context_when_out_of_memory = value != 0;
break;
+ case kES3ContextRequired:
+ es3_context_required = value != 0;
+ break;
case kNone:
// Terminate list, even if more attributes.
return true;
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698