Normalize GL_UNPACK_ALIGNMENT
Several places were setting GL_UNPACK_ALIGNMENT
unneccessarily, whereas other places were assuming an
unpack alignment of 1. Since we never actually
do explicit row-alignment, set GL_UNPACK_ALIGNMENT
to 1 at context creation time and never change it
Bug: 26584230
Also turns on aggressive glGetError checking to
better catch potential problem zones
Change-Id: I190c8f0f0494a7f046d5ed769405c75d363be59a
diff --git a/libs/hwui/utils/GLUtils.h b/libs/hwui/utils/GLUtils.h
index 6c521e4..85a10f9 100644
--- a/libs/hwui/utils/GLUtils.h
+++ b/libs/hwui/utils/GLUtils.h
@@ -16,12 +16,14 @@
#ifndef GLUTILS_H
#define GLUTILS_H
+#include "Debug.h"
+
#include <cutils/log.h>
namespace android {
namespace uirenderer {
-#if 0
+#if DEBUG_OPENGL
#define GL_CHECKPOINT() LOG_ALWAYS_FATAL_IF(GLUtils::dumpGLErrors(),\
"GL errors! %s:%d", __FILE__, __LINE__)
#else