From c92aadcf9a49e85b21293a96d73a2d0a8a08fe64 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Thu, 4 Dec 2014 13:02:47 -0800 Subject: clean up default precision handling R=joshualitt@google.com Review URL: https://codereview.chromium.org/766753006 --- include/gpu/GrShaderVar.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'include/gpu') diff --git a/include/gpu/GrShaderVar.h b/include/gpu/GrShaderVar.h index cbc074df7b..967ae82689 100644 --- a/include/gpu/GrShaderVar.h +++ b/include/gpu/GrShaderVar.h @@ -35,14 +35,13 @@ public: }; enum Precision { - kLow_Precision, // lowp - kMedium_Precision, // mediump - kHigh_Precision, // highp - kDefault_Precision, // Default for the current context. We make - // fragment shaders default to mediump on ES2 - // because highp support is not guaranteed (and - // we haven't been motivated to test for it). - // Otherwise, highp. + kLow_Precision, + kMedium_Precision, + kHigh_Precision, + + // Default precision is medium. This is because on OpenGL ES 2 highp support is not + // guaranteed. On (non-ES) OpenGL the specifiers have no effect on precision. + kDefault_Precision = kMedium_Precision, }; /** -- cgit v1.2.3