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

Unified Diff: src/gpu/gl/GrGLRenderTarget.cpp

Issue 1905063002: Guard against FramebufferStatus checks in GrGLRenderTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 4 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698