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

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

Issue 689633003: Improve context loss error handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Removed command buffer autogenerated files update and addressed comments Created 6 years, 2 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 | « no previous file | gpu/command_buffer/service/error_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
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 41db0b8143cf5d9eaf07035273f88b04222db926..6b34f3926164bc760acda7ccfbf0d83a7bfcd36b 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -23,7 +23,8 @@ enum GLErrorBit {
kInvalidValue = (1 << 1),
kInvalidOperation = (1 << 2),
kOutOfMemory = (1 << 3),
- kInvalidFrameBufferOperation = (1 << 4)
+ kInvalidFrameBufferOperation = (1 << 4),
+ kContextLost = (1 << 5)
};
}
@@ -564,6 +565,8 @@ uint32 GLES2Util::GLErrorToErrorBit(uint32 error) {
return gl_error_bit::kOutOfMemory;
case GL_INVALID_FRAMEBUFFER_OPERATION:
return gl_error_bit::kInvalidFrameBufferOperation;
+ case GL_CONTEXT_LOST_KHR:
+ return gl_error_bit::kContextLost;
default:
NOTREACHED();
return gl_error_bit::kNoError;
@@ -582,6 +585,8 @@ uint32 GLES2Util::GLErrorBitToGLError(uint32 error_bit) {
return GL_OUT_OF_MEMORY;
case gl_error_bit::kInvalidFrameBufferOperation:
return GL_INVALID_FRAMEBUFFER_OPERATION;
+ case gl_error_bit::kContextLost:
+ return GL_CONTEXT_LOST_KHR;
default:
NOTREACHED();
return GL_NO_ERROR;
« no previous file with comments | « no previous file | gpu/command_buffer/service/error_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698