Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index ad0f2caf78619944c53ad4f10cce6988eb1a660f..a2fe2a293bfbb05f07fed18fb20605479ce5334d 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -700,6 +700,8 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa |
fMSFBOType = kES_EXT_MsToTexture_MSFBOType; |
} else if (ctxInfo.hasExtension("GL_IMG_multisampled_render_to_texture")) { |
fMSFBOType = kES_IMG_MsToTexture_MSFBOType; |
+ } else if (fShaderCaps->mixedSamplesSupport() && fShaderCaps->pathRenderingSupport()) { |
vbuzinov
2015/06/10 11:23:27
Currently crashes here due to uninitialized fShade
bsalomon
2015/06/10 19:57:07
Is it possible to just make the shader caps be ini
Chris Dalton
2015/06/10 20:55:56
It's not wrong, just not very useful without path
|
+ fMSFBOType = kMixedSamples_MSFBOType; |
} else if (ctxInfo.version() >= GR_GL_VER(3,0)) { |
fMSFBOType = GrGLCaps::kES_3_0_MSFBOType; |
} else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) { |
@@ -710,7 +712,9 @@ void GrGLCaps::initFSAASupport(const GrGLContextInfo& ctxInfo, const GrGLInterfa |
fMSFBOType = kES_Apple_MSFBOType; |
} |
} else { |
- if ((ctxInfo.version() >= GR_GL_VER(3,0)) || |
+ if (fShaderCaps->mixedSamplesSupport() && fShaderCaps->pathRenderingSupport()) { |
+ fMSFBOType = kMixedSamples_MSFBOType; |
+ } else if ((ctxInfo.version() >= GR_GL_VER(3,0)) || |
ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { |
fMSFBOType = GrGLCaps::kDesktop_ARB_MSFBOType; |
} else if (ctxInfo.hasExtension("GL_EXT_framebuffer_multisample") && |
@@ -843,6 +847,7 @@ SkString GrGLCaps::dump() const { |
"Apple", |
"IMG MS To Texture", |
"EXT MS To Texture", |
+ "MixedSamples", |
}; |
GR_STATIC_ASSERT(0 == kNone_MSFBOType); |
GR_STATIC_ASSERT(1 == kDesktop_ARB_MSFBOType); |
@@ -851,6 +856,7 @@ SkString GrGLCaps::dump() const { |
GR_STATIC_ASSERT(4 == kES_Apple_MSFBOType); |
GR_STATIC_ASSERT(5 == kES_IMG_MsToTexture_MSFBOType); |
GR_STATIC_ASSERT(6 == kES_EXT_MsToTexture_MSFBOType); |
+ GR_STATIC_ASSERT(7 == kMixedSamples_MSFBOType); |
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMSFBOExtStr) == kLast_MSFBOType + 1); |
static const char* kInvalidateFBTypeStr[] = { |