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

Commit 99bcdc52 authored by Romain Guy's avatar Romain Guy
Browse files

Return identity matrix when rendering in an FBO.

Change-Id: I57438e745b30c8cfe16c269f3cafcd719049d705
parent bbf68c6a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -585,8 +585,11 @@ void OpenGLRenderer::setMatrix(SkMatrix* matrix) {
}

const float* OpenGLRenderer::getMatrix() const {
    if (mSnapshot->fbo != 0) {
        return &mSnapshot->transform->data[0];
    }
    return &mIdentity.data[0];
}

void OpenGLRenderer::getMatrix(SkMatrix* matrix) {
    mSnapshot->transform->copyTo(*matrix);
+3 −0
Original line number Diff line number Diff line
@@ -432,6 +432,9 @@ private:
    // Misc
    GLint mMaxTextureSize;

    // Indentity matrix
    const mat4 mIdentity;

    friend class DisplayListRenderer;

}; // class OpenGLRenderer