From 2c10ebd9294d95426d42c5e4d40aa3db751e23ad Mon Sep 17 00:00:00 2001 From: Sunghyun Kim Date: Mon, 30 Mar 2020 13:49:47 +0900 Subject: Change precision mediump to highp for rendering issue. some device can't support mediump, so it makes rendering issue. To avoid it, we change precision mediump to highp Change-Id: Ie3b0856b69828dcd4eba4871b6189935928d76a2 --- src/cairo-gl-shaders.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c index b5796f79d..f50d648b0 100644 --- a/src/cairo-gl-shaders.c +++ b/src/cairo-gl-shaders.c @@ -220,7 +220,7 @@ _cairo_gl_context_init_shaders (cairo_gl_context_t *ctx) { static const char *fill_fs_source = "#ifdef GL_ES\n" - "precision mediump float;\n" + "precision highp float;\n" "#endif\n" "uniform vec4 color;\n" "void main()\n" @@ -231,7 +231,7 @@ _cairo_gl_context_init_shaders (cairo_gl_context_t *ctx) static const char *glsl330_fill_fs_source = "#version 330\n" "#ifdef GL_ES\n" - "precision mediump float;\n" + "precision highp float;\n" "#endif\n" "uniform vec4 color;\n" "out vec4 fsColorOut;\n" @@ -505,7 +505,7 @@ cairo_gl_shader_get_vertex_source (cairo_gl_var_type_t src, if (needs_glsl330 == CAIRO_GLSL_VERSION_330) _cairo_output_stream_printf (stream, "#version 330\n"); - _cairo_output_stream_printf (stream, "#ifdef GL_ES\nprecision mediump float;\n#endif\n"); + _cairo_output_stream_printf (stream, "#ifdef GL_ES\nprecision highp float;\n#endif\n"); cairo_gl_shader_emit_variable (stream, src, CAIRO_GL_TEX_SOURCE, src_use_atlas); cairo_gl_shader_emit_variable (stream, mask, CAIRO_GL_TEX_MASK, mask_use_atlas); @@ -1574,7 +1574,7 @@ cairo_gl_shader_get_fragment_source (cairo_gl_context_t *ctx, _cairo_output_stream_printf (stream, "#ifdef GL_ES\n" - "precision mediump float;\n" + "precision highp float;\n" "#endif\n"); _cairo_gl_shader_emit_wrap (ctx, stream, src, CAIRO_GL_TEX_SOURCE); -- cgit v1.2.3