diff options
author | derekf <derekf@osg.samsung.com> | 2014-09-16 06:24:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 06:24:58 -0700 |
commit | 8c8f71ac07f0611d2c3ec53551c7e0f6a1cc4789 (patch) | |
tree | 99a0918368070a16c004719881503de8c927f878 | |
parent | 223ba624b70ed5732688e3a8a63a423a9f9b02ad (diff) |
Always disable the scissor test before BlitFrameBuffer
It seems most (all?) implementations of BlitFrameBuffer actually
obey the scissor test, so just always disable the scissor before
calling BlitFrameBuffer.
Original Author: Henry Song <henrysong@samsung.com>
R=bsalomon@google.com, hcm@google.com
Author: derekf@osg.samsung.com
Review URL: https://codereview.chromium.org/574543002
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 22 |
2 files changed, 11 insertions, 12 deletions
@@ -23,6 +23,7 @@ MIPS <*@imgtec.com> NVIDIA <*@nvidia.com> Opera Software ASA <*@opera.com> Samsung <*@samsung.com> +Samsung Open Source Group <*@osg.samsung.com> Skia <*@skia.org> Skia Buildbots <skia.buildbots@gmail.com> Steve Singer <steve@ssinger.info> diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 39cb84ecfe..c335e128c7 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -1819,14 +1819,13 @@ void GrGpuGL::onResolveRenderTarget(GrRenderTarget* target) { this->flushScissor(rt->getViewport(), rt->origin()); GL_CALL(ResolveMultisampleFramebuffer()); } else { - if (GrGLCaps::kDesktop_EXT_MSFBOType == this->glCaps().msFBOType()) { - // this respects the scissor during the blit, so disable it. - asr.reset(&fScissorState); - fScissorState.fEnabled = false; - this->flushScissor(rt->getViewport(), rt->origin()); - } int right = r.fLeft + r.fWidth; int top = r.fBottom + r.fHeight; + + // BlitFrameBuffer respects the scissor, so disable it. + asr.reset(&fScissorState); + fScissorState.fEnabled = false; + this->flushScissor(rt->getViewport(), rt->origin()); GL_CALL(BlitFramebuffer(r.fLeft, r.fBottom, right, top, r.fLeft, r.fBottom, right, top, GR_GL_COLOR_BUFFER_BIT, GR_GL_NEAREST)); @@ -2495,12 +2494,11 @@ bool GrGpuGL::onCopySurface(GrSurface* dst, dst->origin()); GrAutoTRestore<ScissorState> asr; - if (GrGLCaps::kDesktop_EXT_MSFBOType == this->glCaps().msFBOType()) { - // The EXT version applies the scissor during the blit, so disable it. - asr.reset(&fScissorState); - fScissorState.fEnabled = false; - this->flushScissor(dstGLRect, dst->origin()); - } + // BlitFrameBuffer respects the scissor, so disable it. + asr.reset(&fScissorState); + fScissorState.fEnabled = false; + this->flushScissor(dstGLRect, dst->origin()); + GrGLint srcY0; GrGLint srcY1; // Does the blit need to y-mirror or not? |