Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: ui/gl/scoped_binders.h

Issue 1419733005: gpu: Add YCbCr 420v extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on master. Add gl/gfx namespace qualifiers. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GL_SCOPED_BINDERS_H_ 5 #ifndef UI_GL_SCOPED_BINDERS_H_
6 #define UI_GL_SCOPED_BINDERS_H_ 6 #define UI_GL_SCOPED_BINDERS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/gl/gl_export.h" 9 #include "ui/gl/gl_export.h"
10 10
(...skipping 27 matching lines...) Expand all
38 // GLStateRestorer to maximize driver compabitility. 38 // GLStateRestorer to maximize driver compabitility.
39 GLStateRestorer* state_restorer_; 39 GLStateRestorer* state_restorer_;
40 40
41 // Failing that we use GL calls to save and restore state. 41 // Failing that we use GL calls to save and restore state.
42 int target_; 42 int target_;
43 int old_id_; 43 int old_id_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(ScopedTextureBinder); 45 DISALLOW_COPY_AND_ASSIGN(ScopedTextureBinder);
46 }; 46 };
47 47
48 class GL_EXPORT ScopedUseProgram {
49 public:
50 ScopedUseProgram(unsigned int program);
51 ~ScopedUseProgram();
52
53 private:
54 // TODO(dcastagna): Use GLStateRestorer.
55 int old_program_;
56
57 DISALLOW_COPY_AND_ASSIGN(ScopedUseProgram);
58 };
59
60 class GL_EXPORT ScopedEnableVertexAttribArray {
61 public:
62 ScopedEnableVertexAttribArray(unsigned int index);
63 ~ScopedEnableVertexAttribArray();
64
65 private:
66 // TODO(dcastagna): Use GLStateRestorer.
67 int enabled_;
68 int index_;
69
70 DISALLOW_COPY_AND_ASSIGN(ScopedEnableVertexAttribArray);
71 };
72
73 class GL_EXPORT ScopedBufferBinder {
74 public:
75 ScopedBufferBinder(unsigned int target, unsigned int index);
76 ~ScopedBufferBinder();
77
78 private:
79 // TODO(dcastagna): Use GLStateRestorer.
80 int target_;
81 int old_id_;
82
83 DISALLOW_COPY_AND_ASSIGN(ScopedBufferBinder);
84 };
85
48 } // namespace gfx 86 } // namespace gfx
49 87
50 #endif // UI_GL_SCOPED_BINDERS_H_ 88 #endif // UI_GL_SCOPED_BINDERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698