1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/gpu/gl/debug/GrRenderBufferObj.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 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 GrRenderBufferObj_DEFINED 1.13 +#define GrRenderBufferObj_DEFINED 1.14 + 1.15 +#include "GrFBBindableObj.h" 1.16 + 1.17 +//////////////////////////////////////////////////////////////////////////////// 1.18 +class GrRenderBufferObj : public GrFBBindableObj { 1.19 + GR_DEFINE_CREATOR(GrRenderBufferObj); 1.20 + 1.21 +public: 1.22 + GrRenderBufferObj() 1.23 + : GrFBBindableObj() 1.24 + , fBound(false) { 1.25 + } 1.26 + 1.27 + void setBound() { fBound = true; } 1.28 + void resetBound() { fBound = false; } 1.29 + bool getBound() const { return fBound; } 1.30 + 1.31 + virtual void deleteAction() SK_OVERRIDE { 1.32 + 1.33 + this->INHERITED::deleteAction(); 1.34 + } 1.35 + 1.36 +protected: 1.37 +private: 1.38 + bool fBound; // is this render buffer currently bound via "glBindRenderbuffer"? 1.39 + 1.40 + typedef GrFBBindableObj INHERITED; 1.41 +}; 1.42 + 1.43 +#endif // GrRenderBufferObj_DEFINED