diff options
author | cdalton <cdalton@nvidia.com> | 2015-03-16 17:19:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-16 17:19:58 -0700 |
commit | d0a840d4d8bb6ebc9981cc331b1b231a6c6e0928 (patch) | |
tree | 44cb2a51ac5386fd05f8f3af07ae11083ea2a8f5 /src/gpu/GrPipelineBuilder.cpp | |
parent | 18ef5ebf3b1bab01167c34bac09bb2a1a40d5c8e (diff) |
Disable GL_MULTISAMPLE when it's not being used
Updates Gr to disable GL_MULTISAMPLE when drawing to an aliased render
target. This is an important step for NV_framebuffer_mixed_samples,
where just because the color buffer isn't multisampled doesn't mean
other stages in the graphics pipeline aren't. It also removes the need
for the "isLineDraw" workaround that was in GrGLGpu::flushHWAAState.
BUG=skia:
Review URL: https://codereview.chromium.org/1002013006
Diffstat (limited to 'src/gpu/GrPipelineBuilder.cpp')
-rw-r--r-- | src/gpu/GrPipelineBuilder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp index b3b602f469..1d8aa4f2b4 100644 --- a/src/gpu/GrPipelineBuilder.cpp +++ b/src/gpu/GrPipelineBuilder.cpp @@ -74,7 +74,8 @@ void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt, c fClip = clip; this->setState(GrPipelineBuilder::kDither_StateBit, paint.isDither()); - this->setState(GrPipelineBuilder::kHWAntialias_StateBit, paint.isAntiAlias()); + this->setState(GrPipelineBuilder::kHWAntialias_StateBit, + rt->isMultisampled() && paint.isAntiAlias()); fColorProcInfoValid = false; fCoverageProcInfoValid = false; |