Index: src/gpu/gl/GrGpuGL.cpp |
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp |
index 75b41913663bedfa932ca498a2e661dd6392beb0..bc067e0062470bd01f87a958c35260ac96365f69 100644 |
--- a/src/gpu/gl/GrGpuGL.cpp |
+++ b/src/gpu/gl/GrGpuGL.cpp |
@@ -768,27 +768,12 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc, |
return succeeded; |
} |
-namespace { |
-bool renderbuffer_storage_msaa(GrGLContext& ctx, |
- int sampleCount, |
- GrGLenum format, |
- int width, int height) { |
+static bool renderbuffer_storage_msaa(GrGLContext& ctx, |
+ int sampleCount, |
+ GrGLenum format, |
+ int width, int height) { |
CLEAR_ERROR_BEFORE_ALLOC(ctx.interface()); |
SkASSERT(GrGLCaps::kNone_MSFBOType != ctx.info().caps()->msFBOType()); |
- bool created = false; |
- if (GrGLCaps::kNVDesktop_CoverageAAType == |
- ctx.info().caps()->coverageAAType()) { |
- const GrGLCaps::MSAACoverageMode& mode = |
- ctx.info().caps()->getMSAACoverageMode(sampleCount); |
- GL_ALLOC_CALL(ctx.interface(), |
- RenderbufferStorageMultisampleCoverage(GR_GL_RENDERBUFFER, |
- mode.fCoverageSampleCnt, |
- mode.fColorSampleCnt, |
- format, |
- width, height)); |
- created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); |
- } |
- if (!created) { |
#if GR_GL_IGNORE_ES3_MSAA |
GL_ALLOC_CALL(ctx.interface(), |
RenderbufferStorageMultisample(GR_GL_RENDERBUFFER, |
@@ -796,40 +781,37 @@ bool renderbuffer_storage_msaa(GrGLContext& ctx, |
format, |
width, height)); |
#else |
- switch (ctx.info().caps()->msFBOType()) { |
- case GrGLCaps::kDesktop_ARB_MSFBOType: |
- case GrGLCaps::kDesktop_EXT_MSFBOType: |
- case GrGLCaps::kES_3_0_MSFBOType: |
- GL_ALLOC_CALL(ctx.interface(), |
- RenderbufferStorageMultisample(GR_GL_RENDERBUFFER, |
- sampleCount, |
- format, |
- width, height)); |
- break; |
- case GrGLCaps::kES_Apple_MSFBOType: |
- GL_ALLOC_CALL(ctx.interface(), |
- RenderbufferStorageMultisampleES2APPLE(GR_GL_RENDERBUFFER, |
- sampleCount, |
- format, |
- width, height)); |
- break; |
- case GrGLCaps::kES_EXT_MsToTexture_MSFBOType: |
- case GrGLCaps::kES_IMG_MsToTexture_MSFBOType: |
- GL_ALLOC_CALL(ctx.interface(), |
- RenderbufferStorageMultisampleES2EXT(GR_GL_RENDERBUFFER, |
- sampleCount, |
- format, |
- width, height)); |
- break; |
- case GrGLCaps::kNone_MSFBOType: |
- GrCrash("Shouldn't be here if we don't support multisampled renderbuffers."); |
- break; |
- } |
-#endif |
- created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); |
+ switch (ctx.info().caps()->msFBOType()) { |
+ case GrGLCaps::kDesktop_ARB_MSFBOType: |
+ case GrGLCaps::kDesktop_EXT_MSFBOType: |
+ case GrGLCaps::kES_3_0_MSFBOType: |
+ GL_ALLOC_CALL(ctx.interface(), |
+ RenderbufferStorageMultisample(GR_GL_RENDERBUFFER, |
+ sampleCount, |
+ format, |
+ width, height)); |
+ break; |
+ case GrGLCaps::kES_Apple_MSFBOType: |
+ GL_ALLOC_CALL(ctx.interface(), |
+ RenderbufferStorageMultisampleES2APPLE(GR_GL_RENDERBUFFER, |
+ sampleCount, |
+ format, |
+ width, height)); |
+ break; |
+ case GrGLCaps::kES_EXT_MsToTexture_MSFBOType: |
+ case GrGLCaps::kES_IMG_MsToTexture_MSFBOType: |
+ GL_ALLOC_CALL(ctx.interface(), |
+ RenderbufferStorageMultisampleES2EXT(GR_GL_RENDERBUFFER, |
+ sampleCount, |
+ format, |
+ width, height)); |
+ break; |
+ case GrGLCaps::kNone_MSFBOType: |
+ GrCrash("Shouldn't be here if we don't support multisampled renderbuffers."); |
+ break; |
} |
- return created; |
-} |
+#endif |
+ return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));; |
} |
bool GrGpuGL::createRenderTargetObjects(int width, int height, |