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; |
} |