blob: 25ab005472acaf8713928c8aee4cfaf37cd06f00 [file] [log] [blame]
tomhudson@google.com168e6342012-04-18 17:49:20 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrCustomStage_DEFINED
9#define GrCustomStage_DEFINED
10
tomhudson@google.com07eecdc2012-04-20 18:35:38 +000011#include "GrRefCnt.h"
12
tomhudson@google.com168e6342012-04-18 17:49:20 +000013class GrContext;
14class GrGLProgramStageFactory;
15
16/** Provides custom vertex shader, fragment shader, uniform data for a
17 particular stage of the Ganesh shading pipeline.
18 TODO: may want to refcount these? */
tomhudson@google.com07eecdc2012-04-20 18:35:38 +000019class GrCustomStage : public GrRefCnt {
tomhudson@google.com168e6342012-04-18 17:49:20 +000020
21public:
22
23 GrCustomStage();
24 virtual ~GrCustomStage();
25
26 /** If given an input texture that is/is not opaque, is this
27 stage guaranteed to produce an opaque output? */
28 virtual bool isOpaque(bool inputTextureIsOpaque) const;
29
30 virtual GrGLProgramStageFactory* getGLFactory() = 0;
31
32protected:
33
34};
35
36#endif