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

Unified Diff: src/gpu/gl/SkGLContextHelper.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
« src/gpu/gl/GrGpuGL.cpp ('K') | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/SkGLContextHelper.cpp
diff --git a/src/gpu/gl/SkGLContextHelper.cpp b/src/gpu/gl/SkGLContextHelper.cpp
index 6f0372dde4fa391eeb191beeae876d455298a522..ca31a08fcacbee628be11dc686e02aeaadf32606 100644
--- a/src/gpu/gl/SkGLContextHelper.cpp
+++ b/src/gpu/gl/SkGLContextHelper.cpp
@@ -51,11 +51,13 @@ bool SkGLContextHelper::init(int width, int height) {
const char* versionStr = reinterpret_cast<const char*>(temp);
GrGLVersion version = GrGLGetVersionFromString(versionStr);
+#ifdef SK_DEBUG
bsalomon 2013/11/07 15:06:59 This file should only be used in our test programs
slavi 2013/11/07 20:53:29 Done.
// clear any existing GL erorrs
GrGLenum error;
do {
SK_GL_RET(*this, error, GetError());
} while (GR_GL_NO_ERROR != error);
+#endif
SK_GL(*this, GenFramebuffers(1, &fFBO));
SK_GL(*this, BindFramebuffer(GR_GL_FRAMEBUFFER, fFBO));
@@ -119,6 +121,7 @@ bool SkGLContextHelper::init(int width, int height) {
SK_GL(*this, ClearStencil(0));
SK_GL(*this, Clear(GR_GL_STENCIL_BUFFER_BIT));
+#ifdef SK_DEBUG
SK_GL_RET(*this, error, GetError());
GrGLenum status;
SK_GL_RET(*this, status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
@@ -135,6 +138,9 @@ bool SkGLContextHelper::init(int width, int height) {
} else {
return true;
}
+#else
+ return true;
+#endif
}
return false;
}
« src/gpu/gl/GrGpuGL.cpp ('K') | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698