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

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

Issue 62163004: Added support for Chrome's gpu command buffer extension BindUniformLocation. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 2e325d486b1eb97b1cc62b6d0279a4f8313de572..d06e02fae763751bd85b36190fea9df8e0afa092 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -123,7 +123,9 @@ GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context)
fHWBoundTextures.reset(ctx.info().caps()->maxFragmentTextureUnits());
fHWTexGenSettings.reset(ctx.info().caps()->maxFixedFunctionTextureCoords());
+#ifdef SK_DEBUG
bsalomon 2013/11/07 15:06:59 Can we make this and the other changes in this fil
slavi 2013/11/07 20:53:29 Done.
GrGLClearErr(fGLContext.interface());
+#endif
if (gPrintStartupSpew) {
const GrGLubyte* vendor;
@@ -810,6 +812,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
GR_GL_COLOR_ATTACHMENT0,
GR_GL_RENDERBUFFER,
desc->fMSColorRenderbufferID));
+#ifdef SK_DEBUG
if (desc->fCheckAllocation ||
!this->glCaps().isConfigVerifiedColorAttachment(desc->fConfig)) {
GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
@@ -818,6 +821,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
}
fGLContext.info().caps()->markConfigAsValidColorAttachment(desc->fConfig);
}
+#endif
}
GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, desc->fTexFBOID));
@@ -832,6 +836,8 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
GR_GL_TEXTURE_2D,
texID, 0));
}
+
+#ifdef SK_DEBUG
if (desc->fCheckAllocation ||
!this->glCaps().isConfigVerifiedColorAttachment(desc->fConfig)) {
GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
@@ -840,6 +846,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
}
fGLContext.info().caps()->markConfigAsValidColorAttachment(desc->fConfig);
}
+#endif
return true;
@@ -1120,6 +1127,7 @@ bool GrGpuGL::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTar
GR_GL_RENDERBUFFER, 0));
}
+#ifdef SK_DEBUG
GrGLenum status;
if (!this->glCaps().isColorConfigAndStencilFormatVerified(rt->config(), glsb->format())) {
GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
@@ -1139,6 +1147,7 @@ bool GrGpuGL::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTar
glsb->format());
}
}
+#endif
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698