summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2015-06-09 14:26:56 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-06-09 14:26:57 +0000
commitc521b10854ebdc227d6f32649c627a548caef2e4 (patch)
treecfac062126ced403e10afc1b0d6243c256377805
parenta121d34ceefc8d106bf48f8fdd400d67445fc573 (diff)
parentf087c828cd0c4f58d0b98bdc73061204b831dd0b (diff)
Merge "Fix a GL error leak issue"
-rw-r--r--libs/hwui/Caches.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index cdf81508d7c4..77b66f213712 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -25,6 +25,7 @@
#include "LayerRenderer.h"
#include "ShadowTessellator.h"
#include "RenderState.h"
+#include "utils/GLUtils.h"
namespace android {
@@ -368,6 +369,12 @@ void Caches::flush(FlushMode mode) {
clearGarbage();
glFinish();
+
+ // glFinish() need dequeue buffer, and it is not 100% success
+ // It generates gl error sometimes, this error will be there
+ // until glGetError called. Call GLUtils::dumpGLErrors to clean
+ // the error in case it leaks to other functions
+ GLUtils::dumpGLErrors();
}
///////////////////////////////////////////////////////////////////////////////