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

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

Issue 226423002: Merge 261120 "gpu: Lose context when BeginQueryEXT fails to allo..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: Created 6 years, 9 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/context_state.h » ('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
===================================================================
--- gpu/command_buffer/common/gles2_cmd_utils.cc (revision 261814)
+++ gpu/command_buffer/common/gles2_cmd_utils.cc (working copy)
@@ -774,23 +774,24 @@
const int32 kShareResources = 0x10000;
const int32 kBindGeneratesResource = 0x10001;
const int32 kFailIfMajorPerfCaveat = 0x10002;
+const int32 kLoseContextWhenOutOfMemory = 0x10003;
} // namespace
ContextCreationAttribHelper::ContextCreationAttribHelper()
- : alpha_size_(-1),
- blue_size_(-1),
- green_size_(-1),
- red_size_(-1),
- depth_size_(-1),
- stencil_size_(-1),
- samples_(-1),
- sample_buffers_(-1),
- buffer_preserved_(true),
- share_resources_(false),
- bind_generates_resource_(true),
- fail_if_major_perf_caveat_(false) {
-}
+ : alpha_size_(-1),
+ blue_size_(-1),
+ green_size_(-1),
+ red_size_(-1),
+ depth_size_(-1),
+ stencil_size_(-1),
+ samples_(-1),
+ sample_buffers_(-1),
+ buffer_preserved_(true),
+ share_resources_(false),
+ bind_generates_resource_(true),
+ fail_if_major_perf_caveat_(false),
+ lose_context_when_out_of_memory_(false) {}
void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) {
if (alpha_size_ != -1) {
@@ -833,6 +834,8 @@
attribs->push_back(bind_generates_resource_ ? 1 : 0);
attribs->push_back(kFailIfMajorPerfCaveat);
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(kNone);
}
@@ -887,6 +890,9 @@
case kFailIfMajorPerfCaveat:
fail_if_major_perf_caveat_ = value != 0;
break;
+ case kLoseContextWhenOutOfMemory:
+ lose_context_when_out_of_memory_ = 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/context_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698