Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 23882009: Rip out CSAA support (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698