summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gl_scoped_binders.h
blob: bdcb7425218ff9562cc159a1519d768d8233f06f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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_