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

Commit ec9b598c authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

am b9a4d15d: Merge "Force-flush state sync on texid change" into lmp-mr1-dev

automerge: b21a7ad0

* commit 'b21a7ad0':
  Force-flush state sync on texid change
parents 3f454e7d b21a7ad0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -64,6 +64,12 @@ void AssetAtlas::terminate() {

void AssetAtlas::updateTextureId() {
    mTexture->id = mImage ? mImage->getTexture() : 0;
    if (mTexture->id) {
        // Texture ID changed, force-set to defaults to sync the wrapper & GL
        // state objects
        mTexture->setWrap(GL_CLAMP_TO_EDGE, false, true);
        mTexture->setFilter(GL_NEAREST, false, true);
    }
    for (size_t i = 0; i < mEntries.size(); i++) {
        AssetAtlas::Entry* entry = mEntries.valueAt(i);
        entry->texture->id = mTexture->id;