2 * Copyright 2013 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef GrGLGeometryProcessor_DEFINED
9 #define GrGLGeometryProcessor_DEFINED
11 #include "GrGLProcessor.h"
16 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, then it must inherit
17 * from this class. Since paths don't have vertices, this class is only meant to be used internally
18 * by skia, for special cases.
20 class GrGLGeometryProcessor : public GrGLProcessor {
22 GrGLGeometryProcessor(const GrBackendProcessorFactory& factory)
23 : INHERITED(factory) {}
26 EmitArgs(GrGLGPBuilder* pb,
27 const GrGeometryProcessor& gp,
28 const GrProcessorKey& key,
31 const TextureSamplerArray& samplers)
32 : fPB(pb), fGP(gp), fKey(key), fOutput(output), fInput(input), fSamplers(samplers) {}
34 const GrGeometryProcessor& fGP;
35 const GrProcessorKey& fKey;
38 const TextureSamplerArray& fSamplers;
41 * This is similar to emitCode() in the base class, except it takes a full shader builder.
42 * This allows the effect subclass to emit vertex code.
44 virtual void emitCode(const EmitArgs&) = 0;
47 typedef GrGLProcessor INHERITED;