OSDN Git Service

Fix a GL error leak issue
authorywen <ywen@codeaurora.org>
Thu, 28 May 2015 06:10:53 +0000 (14:10 +0800)
committerDigish Pandya <digishp@codeaurora.org>
Tue, 9 Jun 2015 12:21:35 +0000 (17:51 +0530)
commitf087c828cd0c4f58d0b98bdc73061204b831dd0b
tree69a4f02d08169a33a49f47ddc6c724b7f29267c5
parent34a63ba4d79567146f2724c47b06ffa4f21639da
Fix a GL error leak issue

glFinish() dequeues a native buffer, and it fails when
the bufeer has been abandoned, this is ok and will not
casue the app crash

GL_OUT_OF_MEMORY is generated in this case, and it is
not reset until glGetError called. This is happened in
build layer function, glGetError is called after glTexImg2d,
and get GL_OUT_OF_MEMORY, then this function return as OOM,
and app crash

Fix it by adding a glGetError after glFinish

Change-Id: I8803a726b6f609c4a2f8a6aa6bb7ff7064808932
libs/hwui/Caches.cpp