chromium/third_party/skia/src/gpu/ganesh/effects/GrAtlasedShaderHelpers.h

/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GrAtlasedShaderHelpers_DEFINED
#define GrAtlasedShaderHelpers_DEFINED

#include "include/private/base/SkAssert.h"
#include "src/core/SkSLTypeShared.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/GrGLSLVarying.h"
#include "src/gpu/ganesh/glsl/GrGLSLVertexGeoBuilder.h"

static inline void append_index_uv_varyings(GrGeometryProcessor::ProgramImpl::EmitArgs& args,
                                            int numTextureSamplers,
                                            const char* inTexCoordsName,
                                            const char* atlasDimensionsInvName,
                                            GrGLSLVarying* uv,
                                            GrGLSLVarying* texIdx,
                                            GrGLSLVarying* st) {}

static inline void append_multitexture_lookup(GrGeometryProcessor::ProgramImpl::EmitArgs& args,
                                              int numTextureSamplers,
                                              const GrGLSLVarying& texIdx,
                                              const char* coordName,
                                              const char* colorName) {}

// Special lookup function for sdf lcd -- avoids duplicating conditional logic three times
static inline void append_multitexture_lookup_lcd(GrGeometryProcessor::ProgramImpl::EmitArgs& args,
                                                  int numTextureSamplers,
                                                  const GrGLSLVarying& texIdx,
                                                  const char* coordName,
                                                  const char* offsetName,
                                                  const char* distanceName) {}

#endif