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..bdcb7425218ff9562cc159a1519d768d8233f06f |
--- /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 CONTENT_COMMON_GPU_GL_SCOPED_BINDERS_H_ |
+#define CONTENT_COMMON_GPU_GL_SCOPED_BINDERS_H_ |
+ |
+namespace content { |
+ |
+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 content |
+ |
+#endif // CONTENT_COMMON_GPU_GL_SCOPED_BINDERS_H_ |