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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 221783002: Revert of gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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/service/error_state.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index c0e0e3d7989901dd1718f8f9f588756c2095fa0d..c3bdae5d5d94a78b9cfa80d8087581f367118ec0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -566,8 +566,7 @@
// This class implements GLES2Decoder so we don't have to expose all the GLES2
// cmd stuff to outside this class.
class GLES2DecoderImpl : public GLES2Decoder,
- public FramebufferManager::TextureDetachObserver,
- public ErrorStateClient {
+ public FramebufferManager::TextureDetachObserver {
public:
explicit GLES2DecoderImpl(ContextGroup* group);
virtual ~GLES2DecoderImpl();
@@ -695,9 +694,6 @@
virtual void OnTextureRefDetachedFromFramebuffer(
TextureRef* texture) OVERRIDE;
- // Overriden from ErrorStateClient.
- virtual void OnOutOfMemoryError() OVERRIDE;
-
// Helpers to facilitate calling into compatible extensions.
static void RenderbufferStorageMultisampleHelper(
const FeatureInfo* feature_info,
@@ -1755,9 +1751,6 @@
bool draw_buffers_explicitly_enabled_;
bool compile_shader_always_succeeds_;
-
- // An optional behaviour to lose the context and group when OOM.
- bool lose_context_when_out_of_memory_;
// Log extra info.
bool service_logging_;
@@ -2224,7 +2217,7 @@
: GLES2Decoder(),
group_(group),
logger_(&debug_marker_manager_),
- state_(group_->feature_info(), this, &logger_),
+ state_(group_->feature_info(), &logger_),
unpack_flip_y_(false),
unpack_premultiply_alpha_(false),
unpack_unpremultiply_alpha_(false),
@@ -2257,7 +2250,6 @@
frag_depth_explicitly_enabled_(false),
draw_buffers_explicitly_enabled_(false),
compile_shader_always_succeeds_(false),
- lose_context_when_out_of_memory_(false),
service_logging_(CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGPUServiceLoggingGPU)),
viewport_max_width_(0),
@@ -2330,10 +2322,6 @@
ContextCreationAttribHelper attrib_parser;
if (!attrib_parser.Parse(attribs))
return false;
-
- // Save the loseContextWhenOutOfMemory context creation attribute.
- lose_context_when_out_of_memory_ =
- attrib_parser.lose_context_when_out_of_memory_;
// If the failIfMajorPerformanceCaveat context creation attribute was true
// and we are using a software renderer, fail.
@@ -10671,13 +10659,6 @@
DoDidUseTexImageIfNeeded(texture, texture->target());
}
-void GLES2DecoderImpl::OnOutOfMemoryError() {
- if (lose_context_when_out_of_memory_) {
- group_->LoseContexts(GL_UNKNOWN_CONTEXT_RESET_ARB);
- LoseContext(GL_GUILTY_CONTEXT_RESET_ARB);
- }
-}
-
// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
// instead of having to edit some template or the code generator.
« no previous file with comments | « gpu/command_buffer/service/error_state.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698