gfx/skia/skia/src/gpu/gl/GrGLVaryingHandler.h
author Lee Salzman <lsalzman@mozilla.com>
Tue, 09 Feb 2016 13:38:06 -0500
changeset 283697 159e0a5a653f2789e0c9b94f41501a4a44f7cb34
parent 276855 aa380501527094672fd84092655f82e62c504482
child 295394 cf560124d28f3737353c105eec79677a7731d2e8
permissions -rw-r--r--
Bug 1246756 - part 3 - update Skia to m49 branch. r=jrmuizel

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

#ifndef GrGLVaryingHandler_DEFINED
#define GrGLVaryingHandler_DEFINED

#include "glsl/GrGLSLVarying.h"
#include "GrTypesPriv.h"
#include "gl/GrGLProgramDataManager.h"

class GrGLVaryingHandler : public GrGLSLVaryingHandler {
public:
    GrGLVaryingHandler(GrGLSLProgramBuilder* program)
        : INHERITED(program),
        fPathProcVaryingInfos(kVaryingsPerBlock) {}

    // This function is used by the NVPR PathProcessor to add a varying directly into the fragment
    // shader since there is no vertex shader.
    VaryingHandle addPathProcessingVarying(const char* name, GrGLSLVertToFrag*,
                                           GrSLPrecision fsPrecision = kDefault_GrSLPrecision);

private:
    typedef GrGLProgramDataManager::VaryingInfo VaryingInfo;
    typedef GrGLProgramDataManager::VaryingInfoArray VaryingInfoArray;

    VaryingInfoArray fPathProcVaryingInfos;

    friend class GrGLProgramBuilder;

    typedef GrGLSLVaryingHandler INHERITED; 
};

#endif