summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunghyun Kim <scholb.kim@samsung.com>2020-03-30 04:49:47 (GMT)
committerSunghyun Kim <scholb.kim@samsung.com>2020-03-30 04:49:47 (GMT)
commitb4dc9472d06916f7dc8ae79ab526bfcdbaf8352f (patch)
treed833f5e93fc8fe7518735fef43de1595043acf8a
parentf91438f2e90922e495317201abbf7b08150294d7 (diff)
downloadcairo-b4dc9472d06916f7dc8ae79ab526bfcdbaf8352f.zip
cairo-b4dc9472d06916f7dc8ae79ab526bfcdbaf8352f.tar.gz
cairo-b4dc9472d06916f7dc8ae79ab526bfcdbaf8352f.tar.bz2
some device can't support mediump, so it makes rendering issue. To avoid it, we change precision mediump to highp Change-Id: Ie3b0856b69828dcd4eba4871b6189935928d76a2
-rw-r--r--src/cairo-gl-shaders.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c
index b5796f7..f50d648 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);