gfx/skia/trunk/src/gpu/gl/debug/GrProgramObj.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1
michael@0 2 /*
michael@0 3 * Copyright 2012 Google Inc.
michael@0 4 *
michael@0 5 * Use of this source code is governed by a BSD-style license that can be
michael@0 6 * found in the LICENSE file.
michael@0 7 */
michael@0 8
michael@0 9 #ifndef GrProgramObj_DEFINED
michael@0 10 #define GrProgramObj_DEFINED
michael@0 11
michael@0 12 #include "SkTArray.h"
michael@0 13 #include "GrFakeRefObj.h"
michael@0 14 class GrShaderObj;
michael@0 15
michael@0 16 ////////////////////////////////////////////////////////////////////////////////
michael@0 17 class GrProgramObj : public GrFakeRefObj {
michael@0 18 GR_DEFINE_CREATOR(GrProgramObj);
michael@0 19
michael@0 20 public:
michael@0 21 GrProgramObj()
michael@0 22 : GrFakeRefObj()
michael@0 23 , fInUse(false) {}
michael@0 24
michael@0 25 void AttachShader(GrShaderObj *shader);
michael@0 26
michael@0 27 virtual void deleteAction() SK_OVERRIDE;
michael@0 28
michael@0 29 // TODO: this flag system won't work w/ multiple contexts!
michael@0 30 void setInUse() { fInUse = true; }
michael@0 31 void resetInUse() { fInUse = false; }
michael@0 32 bool getInUse() const { return fInUse; }
michael@0 33
michael@0 34 protected:
michael@0 35
michael@0 36 private:
michael@0 37 SkTArray<GrShaderObj *> fShaders;
michael@0 38 bool fInUse; // has this program been activated by a glUseProgram call?
michael@0 39
michael@0 40 typedef GrFakeRefObj INHERITED;
michael@0 41 };
michael@0 42
michael@0 43 #endif // GrProgramObj_DEFINED

mercurial