1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/gpu/gl/debug/GrShaderObj.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2012 Google Inc. 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 +#ifndef GrShaderObj_DEFINED 1.13 +#define GrShaderObj_DEFINED 1.14 + 1.15 +#include "GrFakeRefObj.h" 1.16 +#include "../GrGLDefines.h" 1.17 + 1.18 +//////////////////////////////////////////////////////////////////////////////// 1.19 +class GrShaderObj : public GrFakeRefObj { 1.20 + GR_DEFINE_CREATOR(GrShaderObj); 1.21 + 1.22 +public: 1.23 + GrShaderObj() 1.24 + : GrFakeRefObj() 1.25 + , fType(GR_GL_VERTEX_SHADER) {} 1.26 + 1.27 + void setType(GrGLenum type) { fType = type; } 1.28 + GrGLenum getType() { return fType; } 1.29 + 1.30 + virtual void deleteAction() SK_OVERRIDE; 1.31 + 1.32 +protected: 1.33 +private: 1.34 + GrGLenum fType; // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER 1.35 + 1.36 + typedef GrFakeRefObj INHERITED; 1.37 +}; 1.38 + 1.39 +#endif // GrShaderObj_DEFINED