diff options
author | ethannicholas <ethannicholas@google.com> | 2016-01-22 06:48:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-22 06:48:46 -0800 |
commit | 7df3f5e127f8016d17b637cc48a6a4718f1a6822 (patch) | |
tree | 224a919d0ed775835fb6dd40ddb2399214de081e /src/gpu/gl/GrGLCaps.cpp | |
parent | 7481e75830dfae1e9084ff62e3d8438879e31aaa (diff) |
added support for PLS path rendering
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002
Review URL: https://codereview.chromium.org/1541903002
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 9a2a5acad9..ae6e6132b1 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -281,6 +281,17 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, ctxInfo.hasExtension("GL_OES_standard_derivatives"); } + if (ctxInfo.hasExtension("GL_EXT_shader_pixel_local_storage")) { + #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 + GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT, + &glslCaps->fPixelLocalStorageSize); + glslCaps->fPLSPathRenderingSupport = glslCaps->fFBFetchSupport; + } + else { + glslCaps->fPixelLocalStorageSize = 0; + glslCaps->fPLSPathRenderingSupport = false; + } + /************************************************************************** * GrCaps fields **************************************************************************/ @@ -527,7 +538,6 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); glslCaps->fGLSLGeneration = ctxInfo.glslGeneration(); - if (kGLES_GrGLStandard == standard) { if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); |