From c5dffe4b52ec20250909554b9200833ff4239096 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 20 Aug 2013 15:25:21 +0000 Subject: [PATCH] Update renderable configs for ES3 R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23301008 git-svn-id: http://skia.googlecode.com/svn/trunk@10819 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGLCaps.cpp | 6 ++++-- src/gpu/gl/GrGpuGL.cpp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index f399cd45e3..dbf5dee7b1 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -116,7 +116,8 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { if (kDesktop_GrGLBinding == binding) { fRGBA8RenderbufferSupport = true; } else { - fRGBA8RenderbufferSupport = ctxInfo.hasExtension("GL_OES_rgb8_rgba8") || + fRGBA8RenderbufferSupport = version >= GR_GL_VER(3,0) || + ctxInfo.hasExtension("GL_OES_rgb8_rgba8") || ctxInfo.hasExtension("GL_ARM_rgba8"); } @@ -175,7 +176,8 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { ctxInfo.hasExtension("GL_ARB_texture_rg"); } } else { - fTextureRedSupport = ctxInfo.hasExtension("GL_EXT_texture_rg"); + fTextureRedSupport = version >= GR_GL_VER(3,0) || + ctxInfo.hasExtension("GL_EXT_texture_rg"); } fImagingSupport = kDesktop_GrGLBinding == binding && diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 91adfe8299..0a99258633 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -201,6 +201,10 @@ void GrGpuGL::fillInConfigRenderableTable() { // GL_OES_rgb8_rgba8 and/or GL_ARM_rgba8 adds support for RGBA8 // GL_EXT_texture_format_BGRA8888 and/or GL_APPLE_texture_format_BGRA8888 added BGRA support + // ES 3.0 + // Same as ES 2.0 except R8 and RGBA8 are supported without extensions (the functions called + // below already account for this). + if (kDesktop_GrGLBinding == this->glBinding()) { // Post 3.0 we will get R8 // Prior to 3.0 we will get ALPHA8 (with GL_ARB_framebuffer_object)