Index: content/common/gpu/gl_scoped_binders.h |
diff --git a/content/common/gpu/gl_scoped_binders.h b/content/common/gpu/gl_scoped_binders.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dfe82247bf9a6dff5663ce98f5b8c7e95ad6d1f7 |
--- /dev/null |
+++ b/content/common/gpu/gl_scoped_binders.h |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_GPU_GL_SCOPED_BINDERS_H_ |
piman
2012/07/26 20:25:03
correct header guard is CONTENT_COMMON_GPU_GL_SCOP
Pawel Osciak
2012/07/26 20:36:49
Done. Took inspiration from the only file in this
|
+#define CHROME_GPU_GL_SCOPED_BINDERS_H_ |
+ |
+namespace gfx { |
piman
2012/07/26 20:25:03
If it's here, it should be in the namespace conten
Pawel Osciak
2012/07/26 20:36:49
Done.
|
+ |
+class ScopedFrameBufferBinder { |
+ public: |
+ explicit ScopedFrameBufferBinder(unsigned int fbo); |
+ ~ScopedFrameBufferBinder(); |
+ |
+ private: |
+ int old_fbo_; |
+}; |
+ |
+class ScopedTextureBinder { |
+ public: |
+ explicit ScopedTextureBinder(unsigned int id); |
+ ~ScopedTextureBinder(); |
+ |
+ private: |
+ int old_id_; |
+}; |
+ |
+} // namespace gfx |
+ |
+#endif // CHROME_GPU_GL_SCOPED_BINDERS_H_ |