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
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp
index b3b602f..1d8aa4f 100644
--- a/src/gpu/GrPipelineBuilder.cpp
+++ b/src/gpu/GrPipelineBuilder.cpp
@@ -74,7 +74,8 @@
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;