Index: src/gpu/gl/GrGLRenderTarget.cpp |
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp |
index d4585f6402f926441d3893b632c1c1ebcaafe005..b77ec4b44740e18b63ac5cf209d03303175ced69 100644 |
--- a/src/gpu/gl/GrGLRenderTarget.cpp |
+++ b/src/gpu/gl/GrGLRenderTarget.cpp |
@@ -84,9 +84,13 @@ bool GrGLRenderTarget::completeStencilAttachment() { |
GR_GL_DEPTH_ATTACHMENT, |
GR_GL_RENDERBUFFER, 0)); |
#ifdef SK_DEBUG |
- GrGLenum status; |
- GR_GL_CALL_RET(interface, status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER)); |
- SkASSERT(GR_GL_FRAMEBUFFER_COMPLETE == status); |
+ if (kChromium_GrGLDriver != gpu->glContext().driver()) { |
+ // This check can cause problems in Chromium if the context has been asynchronously |
+ // abandoned (see skbug.com/5200) |
+ GrGLenum status; |
+ GR_GL_CALL_RET(interface, status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER)); |
+ SkASSERT(GR_GL_FRAMEBUFFER_COMPLETE == status); |
+ } |
#endif |
return true; |
} else { |
@@ -110,9 +114,13 @@ bool GrGLRenderTarget::completeStencilAttachment() { |
} |
#ifdef SK_DEBUG |
- GrGLenum status; |
- GR_GL_CALL_RET(interface, status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER)); |
- SkASSERT(GR_GL_FRAMEBUFFER_COMPLETE == status); |
+ if (kChromium_GrGLDriver != gpu->glContext().driver()) { |
+ // This check can cause problems in Chromium if the context has been asynchronously |
+ // abandoned (see skbug.com/5200) |
+ GrGLenum status; |
+ GR_GL_CALL_RET(interface, status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER)); |
+ SkASSERT(GR_GL_FRAMEBUFFER_COMPLETE == status); |
+ } |
#endif |
return true; |
} |