Commit 327b689a authored by Markus Stange's avatar Markus Stange
Browse files

Bug 1491442 - Make reftest readback read from the current render target. r=mattwoodrow

This removes the assumption that there is a default framebuffer to read from,
in order to prepare for a world in which all rendering goes into non-default
framebuffers.
The current render target's framebuffer is already bound when this function is
called.

Differential Revision: https://phabricator.services.mozilla.com/D40513

--HG--
extra : moz-landing-system : lando
parent 3bf7ba66
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1827,8 +1827,6 @@ void CompositorOGL::CopyToTarget(DrawTarget* aTarget,
    return;
  }

  mGLContext->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, 0);

  if (!mGLContext->IsGLES()) {
    // GLES2 promises that binding to any custom FBO will attach
    // to GL_COLOR_ATTACHMENT0 attachment point.
+2 −2
Original line number Diff line number Diff line
@@ -434,8 +434,8 @@ class CompositorOGL final : public Compositor {
                    GLenum aTexUnit);

  /**
   * Copies the content of our backbuffer to the set transaction target.
   * Does not restore the target FBO, so only call from EndFrame.
   * Copies the content of the current render target to the set transaction
   * target.
   */
  void CopyToTarget(gfx::DrawTarget* aTarget, const nsIntPoint& aTopLeft,
                    const gfx::Matrix& aWorldMatrix);