aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 8214b6ea53..08ab47ab8c 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1848,6 +1848,7 @@ void GrGpuGL::flushAAState(GrPrimitiveType type) {
// we prefer smooth lines over multisampled lines
// msaa should be disabled if drawing smooth lines.
+ bool handledMSAA = false;
if (GrIsPrimTypeLines(type)) {
bool smooth = this->willUseHWAALines();
if (!fHWAAState.fSmoothLineEnabled && smooth) {
@@ -1857,14 +1858,15 @@ void GrGpuGL::flushAAState(GrPrimitiveType type) {
GL_CALL(Disable(GR_GL_LINE_SMOOTH));
fHWAAState.fSmoothLineEnabled = false;
}
- if (rt->isMultisampled() &&
- fHWAAState.fMSAAEnabled) {
+ if (smooth && rt->isMultisampled() && fHWAAState.fMSAAEnabled) {
GL_CALL(Disable(GR_GL_MULTISAMPLE));
fHWAAState.fMSAAEnabled = false;
+ handledMSAA = true;
}
- } else if (rt->isMultisampled() &&
- this->getDrawState().isHWAntialiasState() !=
- fHWAAState.fMSAAEnabled) {
+ }
+ if (!handledMSAA && rt->isMultisampled() &&
+ this->getDrawState().isHWAntialiasState() !=
+ fHWAAState.fMSAAEnabled) {
if (fHWAAState.fMSAAEnabled) {
GL_CALL(Disable(GR_GL_MULTISAMPLE));
fHWAAState.fMSAAEnabled = false;