LCOV - code coverage report
Current view: top level - gfx/skia/skia/src/sksl/ast - SkSLASTPrecision.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 11 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright 2016 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             : #ifndef SKSL_ASTPRECISION
       9             : #define SKSL_ASTPRECISION
      10             : 
      11             : #include "SkSLASTDeclaration.h"
      12             : #include "../ir/SkSLModifiers.h"
      13             : 
      14             : namespace SkSL {
      15             : 
      16             : /**
      17             :  * Represents a precision declaration (e.g. 'precision mediump float;').
      18             :  */
      19           0 : struct ASTPrecision : public ASTDeclaration {
      20             :     // FIXME handle the type
      21           0 :     ASTPrecision(Position position, Modifiers::Flag precision)
      22           0 :     : INHERITED(position, kPrecision_Kind)
      23           0 :     , fPrecision(precision) {}
      24             : 
      25           0 :     String description() const {
      26           0 :         switch (fPrecision) {
      27           0 :             case Modifiers::kLowp_Flag: return String("precision lowp float;");
      28           0 :             case Modifiers::kMediump_Flag: return String("precision mediump float;");
      29           0 :             case Modifiers::kHighp_Flag: return String("precision highp float;");
      30             :             default:
      31           0 :                 ASSERT(false);
      32           0 :                 return String("<error>");
      33             :         }
      34             :         ASSERT(false);
      35             :         return String("<error>");
      36             :     }
      37             : 
      38             :     const Modifiers::Flag fPrecision;
      39             : 
      40             :     typedef ASTDeclaration INHERITED;
      41             : };
      42             : 
      43             : } // namespace
      44             : 
      45             : #endif

Generated by: LCOV version 1.13