LCOV - code coverage report
Current view: top level - gfx/skia/skia/src/gpu/glsl - GrGLSL.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 23 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright 2011 Google Inc.
       3             :  *
       4             :  * Use of this source code is governed by a BSD-style license that can be
       5             :  * found in the LICENSE file.
       6             :  */
       7             : 
       8             : #include "GrShaderCaps.h"
       9             : #include "SkString.h"
      10             : #include "../private/GrGLSL.h"
      11             : 
      12           0 : bool GrGLSLSupportsNamedFragmentShaderOutputs(GrGLSLGeneration gen) {
      13           0 :     switch (gen) {
      14             :         case k110_GrGLSLGeneration:
      15           0 :             return false;
      16             :         case k130_GrGLSLGeneration:
      17             :         case k140_GrGLSLGeneration:
      18             :         case k150_GrGLSLGeneration:
      19             :         case k330_GrGLSLGeneration:
      20             :         case k400_GrGLSLGeneration:
      21             :         case k420_GrGLSLGeneration:
      22             :         case k310es_GrGLSLGeneration:
      23             :         case k320es_GrGLSLGeneration:
      24           0 :             return true;
      25             :     }
      26           0 :     return false;
      27             : }
      28             : 
      29           0 : void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p,
      30             :                                                   const GrShaderCaps& shaderCaps,
      31             :                                                   SkString* out) {
      32           0 :     if (shaderCaps.usesPrecisionModifiers()) {
      33           0 :         switch (p) {
      34             :             case kHigh_GrSLPrecision:
      35           0 :                 out->append("precision highp float;\n");
      36           0 :                 break;
      37             :             case kMedium_GrSLPrecision:
      38           0 :                 out->append("precision mediump float;\n");
      39           0 :                 break;
      40             :             case kLow_GrSLPrecision:
      41           0 :                 out->append("precision lowp float;\n");
      42           0 :                 break;
      43             :             default:
      44           0 :                 SkFAIL("Unknown precision value.");
      45             :         }
      46             :     }
      47           0 : }
      48             : 
      49           0 : void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSLExpr4& mulFactor) {
      50           0 :     if (mulFactor.isOnes()) {
      51           0 :         *outAppend = SkString();
      52             :     }
      53             : 
      54           0 :     if (mulFactor.isZeros()) {
      55           0 :         outAppend->appendf("%s = vec4(0);", vec4VarName);
      56             :     } else {
      57           0 :         outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str());
      58             :     }
      59           0 : }

Generated by: LCOV version 1.13