Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 445bac11 authored by chilun_huang's avatar chilun_huang Committed by Steve Kondik
Browse files

[HWUI] The IBO state should be reset after glDeleteBuffers.

Symptom:
Can't bind to correct IBO.

Root Cause:
If a buffer object that is currently bound is deleted by glDeleteBuffers, the binding reverts to 0.
This may cause bindIndicesBuffer doesn't work if mCurrentIndicesBuffer not reset to 0.

Solution:
Reset mCurrentIndicesBuffer to 0 after glDeleteBuffers.

Change-Id: Iecd3ded76d876fcadde89a8893bab5f75b1eb312
parent d22a5b85
Loading
Loading
Loading
Loading

libs/hwui/Caches.cpp

100644 → 100755
+1 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ void Caches::terminate() {
    glDeleteBuffers(1, &mMeshIndices);
    delete[] mRegionMesh;
    mMeshIndices = 0;
    mCurrentIndicesBuffer = 0;
    mRegionMesh = NULL;

    fboCache.clear();