summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 04:56:18 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 04:56:18 +0000
commit16578a8e3481ffdde5b699fe747f114efb64a26b (patch)
treeaded2899b6e2b8c44ed8efdad826a9c2659c173f /gpu/command_buffer/common
parent1cd6af20ba32d3fc4ebf4290cf25f8fac9bc9c05 (diff)
downloadchromium_src-16578a8e3481ffdde5b699fe747f114efb64a26b.zip
chromium_src-16578a8e3481ffdde5b699fe747f114efb64a26b.tar.gz
chromium_src-16578a8e3481ffdde5b699fe747f114efb64a26b.tar.bz2
Revert of gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (https://codereview.chromium.org/199443004/)
Reason for revert: Build failure in content/common/gpu/client/gl_helper_benchmark.cc. http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/63241/steps/compile/logs/stdio Original issue's description: > gpu: Lose context when BeginQueryEXT fails to allocate. > > Instead of crashes, raise a GL_OUT_OF_MEMORY error. Since compositor > does not want to deal with these errors and it would leave it in a > bad state, add the ability to lose the context when GL_OUT_OF_MEMORY > occurs. > > R=piman > BUG=351587 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261064 TBR=piman@chromium.org,dmichael@chromium.org,jamesr@chromium.org,danakj@chromium.org NOTREECHECKS=true NOTRY=true BUG=351587 Review URL: https://codereview.chromium.org/221783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/common')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc32
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.h1
2 files changed, 13 insertions, 20 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 97bc081..f310d47 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -774,24 +774,23 @@ const int32 kBufferDestroyed = 0x3095; // EGL_BUFFER_DESTROYED
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),
- lose_context_when_out_of_memory_(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) {
+}
void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) {
if (alpha_size_ != -1) {
@@ -834,8 +833,6 @@ void ContextCreationAttribHelper::Serialize(std::vector<int32>* attribs) {
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);
}
@@ -890,9 +887,6 @@ bool ContextCreationAttribHelper::Parse(const std::vector<int32>& attribs) {
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;
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
index 0df1f31..59b5d96 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -199,7 +199,6 @@ class GLES2_UTILS_EXPORT ContextCreationAttribHelper {
bool share_resources_;
bool bind_generates_resource_;
bool fail_if_major_perf_caveat_;
- bool lose_context_when_out_of_memory_;
};
} // namespace gles2