Flutter Engine
The Flutter Engine
Functions
GrGLSLVarying.cpp File Reference
#include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
#include "src/gpu/ganesh/GrGeometryProcessor.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/ganesh/glsl/GrGLSLProgramBuilder.h"
#include "src/gpu/ganesh/glsl/GrGLSLShaderBuilder.h"
#include "src/gpu/ganesh/glsl/GrGLSLVertexGeoBuilder.h"
#include "src/sksl/SkSLGLSL.h"

Go to the source code of this file.

Functions

static bool use_flat_interpolation (GrGLSLVaryingHandler::Interpolation interpolation, const GrShaderCaps &shaderCaps)
 

Function Documentation

◆ use_flat_interpolation()

static bool use_flat_interpolation ( GrGLSLVaryingHandler::Interpolation  interpolation,
const GrShaderCaps shaderCaps 
)
static

Definition at line 27 of file GrGLSLVarying.cpp.

28 {
29 switch (interpolation) {
30 using Interpolation = GrGLSLVaryingHandler::Interpolation;
31 case Interpolation::kInterpolated:
32 return false;
33 case Interpolation::kCanBeFlat:
35 return shaderCaps.fPreferFlatInterpolation;
36 case Interpolation::kMustBeFlat:
38 return true;
39 }
40 SK_ABORT("Invalid interpolation");
41}
#define SK_ABORT(message,...)
Definition: SkAssert.h:70
#define SkASSERT(cond)
Definition: SkAssert.h:116
bool fPreferFlatInterpolation
Definition: GrShaderCaps.h:35
bool fFlatInterpolationSupport
Definition: SkSLUtil.h:96