diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-16 20:49:46 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-16 20:49:46 +0000 |
commit | 92b7884e88fc420b6f6ae3589aa3659b6448e005 (patch) | |
tree | ba4c612232b1c979a2e715fe4525ea95be4fcd96 /src | |
parent | 58c0fa37bafc220074dfe993a6faab039035e6e6 (diff) |
Remove GR_GL_IGNORE_ES3_MSAA.s
R=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/140933005
git-svn-id: http://skia.googlecode.com/svn/trunk@13115 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 20 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 8 | ||||
-rw-r--r-- | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp | 49 |
4 files changed, 15 insertions, 64 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 236aeac761..0c6bed419c 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -465,7 +465,7 @@ 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 (!GR_GL_IGNORE_ES3_MSAA && ctxInfo.version() >= GR_GL_VER(3,0)) { + } else if (ctxInfo.version() >= GR_GL_VER(3,0)) { fMSFBOType = GrGLCaps::kES_3_0_MSFBOType; } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) { // chrome's extension is equivalent to the EXT msaa diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 21a66495e5..6e8306b911 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -328,25 +328,6 @@ bool GrGLInterface::validate() const { } } } else { -#if GR_GL_IGNORE_ES3_MSAA - if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) { - if (NULL == fRenderbufferStorageMultisample || - NULL == fBlitFramebuffer) { - return false; - } - } else if (extensions.has("GL_APPLE_framebuffer_multisample")) { - if (NULL == fRenderbufferStorageMultisample || - NULL == fResolveMultisampleFramebuffer) { - return false; - } - } else if (extensions.has("GL_IMG_multisampled_render_to_texture") || - extensions.has("GL_EXT_multisampled_render_to_texture")) { - if (NULL == fRenderbufferStorageMultisample || - NULL == fFramebufferTexture2DMultisample) { - return false; - } - } -#else if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_CHROMIUM_framebuffer_multisample")) { if (NULL == fRenderbufferStorageMultisample || NULL == fBlitFramebuffer) { @@ -366,7 +347,6 @@ bool GrGLInterface::validate() const { return false; } } -#endif } // On ES buffer mapping is an extension. On Desktop diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 6f8d65332e..071d49de50 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -714,13 +714,6 @@ static bool renderbuffer_storage_msaa(GrGLContext& ctx, int width, int height) { CLEAR_ERROR_BEFORE_ALLOC(ctx.interface()); SkASSERT(GrGLCaps::kNone_MSFBOType != ctx.caps()->msFBOType()); -#if GR_GL_IGNORE_ES3_MSAA - GL_ALLOC_CALL(ctx.interface(), - RenderbufferStorageMultisample(GR_GL_RENDERBUFFER, - sampleCount, - format, - width, height)); -#else switch (ctx.caps()->msFBOType()) { case GrGLCaps::kDesktop_ARB_MSFBOType: case GrGLCaps::kDesktop_EXT_MSFBOType: @@ -750,7 +743,6 @@ static bool renderbuffer_storage_msaa(GrGLContext& ctx, GrCrash("Shouldn't be here if we don't support multisampled renderbuffers."); break; } -#endif return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));; } diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp index 72311c417e..03eaa3292a 100644 --- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp +++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp @@ -147,56 +147,35 @@ static const GrGLInterface* create_es_interface(GrGLVersion version, interface->fDeleteRenderbuffers = glDeleteRenderbuffers; interface->fFramebufferRenderbuffer = glFramebufferRenderbuffer; interface->fFramebufferTexture2D = glFramebufferTexture2D; -#if GR_GL_IGNORE_ES3_MSAA + + if (version >= GR_GL_VER(3,0)) { +#if GL_ES_VERSION_3_0 + interface->fRenderbufferStorageMultisample = glRenderbufferStorageMultisample; + interface->fBlitFramebuffer = glBlitFramebuffer; +#else + interface->fRenderbufferStorageMultisample = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisample"); + interface->fBlitFramebuffer = (GrGLBlitFramebufferProc) eglGetProcAddress("glBlitFramebuffer"); +#endif + } if (extensions.has("GL_EXT_multisampled_render_to_texture")) { #if GL_EXT_multisampled_render_to_texture interface->fFramebufferTexture2DMultisample = glFramebufferTexture2DMultisampleEXT; - interface->fRenderbufferStorageMultisample = glRenderbufferStorageMultisampleEXT; + interface->fRenderbufferStorageMultisampleES2EXT = glRenderbufferStorageMultisampleEXT; #else interface->fFramebufferTexture2DMultisample = (GrGLFramebufferTexture2DMultisampleProc) eglGetProcAddress("glFramebufferTexture2DMultisampleEXT"); - interface->fRenderbufferStorageMultisample = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleEXT"); + interface->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleEXT"); #endif } else if (extensions.has("GL_IMG_multisampled_render_to_texture")) { #if GL_IMG_multisampled_render_to_texture interface->fFramebufferTexture2DMultisample = glFramebufferTexture2DMultisampleIMG; - interface->fRenderbufferStorageMultisample = glRenderbufferStorageMultisampleIMG; + interface->fRenderbufferStorageMultisampleES2EXT = glRenderbufferStorageMultisampleIMG; #else interface->fFramebufferTexture2DMultisample = (GrGLFramebufferTexture2DMultisampleProc) eglGetProcAddress("glFramebufferTexture2DMultisampleIMG"); - interface->fRenderbufferStorageMultisample = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleIMG"); + interface->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleIMG"); #endif } -#else // GR_GL_IGNORE_ES3_MSAA - - if (version >= GR_GL_VER(3,0)) { -#if GL_ES_VERSION_3_0 - interface->fRenderbufferStorageMultisample = glRenderbufferStorageMultisample; - interface->fBlitFramebuffer = glBlitFramebuffer; -#else - interface->fRenderbufferStorageMultisample = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisample"); - interface->fBlitFramebuffer = (GrGLBlitFramebufferProc) eglGetProcAddress("glBlitFramebuffer"); -#endif - } - if (extensions.has("GL_EXT_multisampled_render_to_texture")) { -#if GL_EXT_multisampled_render_to_texture - interface->fFramebufferTexture2DMultisample = glFramebufferTexture2DMultisampleEXT; - interface->fRenderbufferStorageMultisampleES2EXT = glRenderbufferStorageMultisampleEXT; -#else - interface->fFramebufferTexture2DMultisample = (GrGLFramebufferTexture2DMultisampleProc) eglGetProcAddress("glFramebufferTexture2DMultisampleEXT"); - interface->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleEXT"); -#endif - } else if (extensions.has("GL_IMG_multisampled_render_to_texture")) { -#if GL_IMG_multisampled_render_to_texture - interface->fFramebufferTexture2DMultisample = glFramebufferTexture2DMultisampleIMG; - interface->fRenderbufferStorageMultisampleES2EXT = glRenderbufferStorageMultisampleIMG; -#else - interface->fFramebufferTexture2DMultisample = (GrGLFramebufferTexture2DMultisampleProc) eglGetProcAddress("glFramebufferTexture2DMultisampleIMG"); - interface->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleIMG"); -#endif - } - -#endif // GR_GL_IGNORE_ES3_MSAA interface->fGenFramebuffers = glGenFramebuffers; interface->fGenRenderbuffers = glGenRenderbuffers; interface->fGetFramebufferAttachmentParameteriv = glGetFramebufferAttachmentParameteriv; |