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

Commit bd41ded5 authored by John Reck's avatar John Reck
Browse files

Fix accidental activateTexture(0)

Bug: 26584230

activateTexture(0) was accidentally refactored into
Texture::upload. Only OffscreenBuffer intended for the
texture unit to change

Change-Id: I5dbfc3eab8843733084ce1ce38a0a946abf0e05b
parent 09a02f1c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ bool Texture::updateSize(uint32_t width, uint32_t height, GLint format) {
void Texture::upload(GLint internalformat, uint32_t width, uint32_t height,
        GLenum format, GLenum type, const void* pixels) {
    GL_CHECKPOINT();
    mCaches.textureState().activateTexture(0);
    bool needsAlloc = updateSize(width, height, internalformat);
    if (!mId) {
        glGenTextures(1, &mId);
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ OffscreenBuffer::OffscreenBuffer(RenderState& renderState, Caches& caches,
        , texture(caches) {
    uint32_t width = computeIdealDimension(viewportWidth);
    uint32_t height = computeIdealDimension(viewportHeight);
    caches.textureState().activateTexture(0);
    texture.resize(width, height, GL_RGBA);
    texture.blend = true;
    texture.setWrap(GL_CLAMP_TO_EDGE);