michael@0: michael@0: /* michael@0: * Copyright 2012 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef GrRenderBufferObj_DEFINED michael@0: #define GrRenderBufferObj_DEFINED michael@0: michael@0: #include "GrFBBindableObj.h" michael@0: michael@0: //////////////////////////////////////////////////////////////////////////////// michael@0: class GrRenderBufferObj : public GrFBBindableObj { michael@0: GR_DEFINE_CREATOR(GrRenderBufferObj); michael@0: michael@0: public: michael@0: GrRenderBufferObj() michael@0: : GrFBBindableObj() michael@0: , fBound(false) { michael@0: } michael@0: michael@0: void setBound() { fBound = true; } michael@0: void resetBound() { fBound = false; } michael@0: bool getBound() const { return fBound; } michael@0: michael@0: virtual void deleteAction() SK_OVERRIDE { michael@0: michael@0: this->INHERITED::deleteAction(); michael@0: } michael@0: michael@0: protected: michael@0: private: michael@0: bool fBound; // is this render buffer currently bound via "glBindRenderbuffer"? michael@0: michael@0: typedef GrFBBindableObj INHERITED; michael@0: }; michael@0: michael@0: #endif // GrRenderBufferObj_DEFINED