Guard against FramebufferStatus checks in GrGLRenderTarget
BUG=skia:5200 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1905063002 Review URL: https://codereview.chromium.org/1905063002
This commit is contained in:
parent
da2cd8b1d9
commit
fa7ff470a8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user