blob: d6fc1706d7ff636978be79f22541cfffdcc1bc75 [file] [log] [blame]
* Copyright 2013 Google Inc.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
#ifndef GrGLPathProcessor_DEFINED
#define GrGLPathProcessor_DEFINED
#include "GrGLPrimitiveProcessor.h"
class GrPathProcessor;
class GrGLPathRendering;
class GrGLGpu;
class GrGLPathProcessor : public GrGLPrimitiveProcessor {
GrGLPathProcessor(const GrPathProcessor&, const GrBatchTracker&);
static void GenKey(const GrPathProcessor&,
const GrBatchTracker& bt,
const GrGLSLCaps&,
GrProcessorKeyBuilder* b);
void emitCode(EmitArgs&) override;
void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsOut*);
void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId);
void setData(const GrGLProgramDataManager&,
const GrPrimitiveProcessor&,
const GrBatchTracker&) override;
void setTransformData(const GrPrimitiveProcessor&,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms,
GrGLuint programID);
virtual void didSetData(GrGLPathRendering*) {}
UniformHandle fColorUniform;
GrColor fColor;
struct SeparableVaryingInfo {
GrSLType fType;
GrGLShaderVar fVariable;
GrGLint fLocation;
typedef SkSTArray<8, SeparableVaryingInfo, true> SeparableVaryingInfoArray;
SeparableVaryingInfoArray fSeparableVaryingInfos;
typedef GrGLPrimitiveProcessor INHERITED;