| Index: ui/gl/scoped_binders.h
|
| diff --git a/ui/gl/scoped_binders.h b/ui/gl/scoped_binders.h
|
| index 3217c36c7b5d23f7680ed00dac336334076bbdc8..88732e933aa1ed335226015f971656488899f79a 100644
|
| --- a/ui/gl/scoped_binders.h
|
| +++ b/ui/gl/scoped_binders.h
|
| @@ -33,7 +33,11 @@ class GL_EXPORT ScopedActiveTexture {
|
| ~ScopedActiveTexture();
|
|
|
| private:
|
| - // TODO(dcastagna): Use GLStateRestorer.
|
| + // Whenever possible we prefer to use the current GLContext's
|
| + // GLStateRestorer to maximize driver compabitility.
|
| + GLStateRestorer* state_restorer_;
|
| +
|
| + // Failing that we use GL calls to save and restore state.
|
| int old_texture_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScopedActiveTexture);
|
| @@ -62,7 +66,11 @@ class GL_EXPORT ScopedUseProgram {
|
| ~ScopedUseProgram();
|
|
|
| private:
|
| - // TODO(dcastagna): Use GLStateRestorer.
|
| + // Whenever possible we prefer to use the current GLContext's
|
| + // GLStateRestorer to maximize driver compabitility.
|
| + GLStateRestorer* state_restorer_;
|
| +
|
| + // Failing that we use GL calls to save and restore state.
|
| int old_program_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScopedUseProgram);
|
| @@ -79,7 +87,11 @@ class GL_EXPORT ScopedVertexAttribArray {
|
| ~ScopedVertexAttribArray();
|
|
|
| private:
|
| - // TODO(dcastagna): Use GLStateRestorer.
|
| + // Whenever possible we prefer to use the current GLContext's
|
| + // GLStateRestorer to maximize driver compabitility.
|
| + GLStateRestorer* state_restorer_;
|
| +
|
| + // Failing that we use GL calls to save and restore state.
|
| int buffer_;
|
| int enabled_;
|
| int index_;
|
| @@ -98,7 +110,11 @@ class GL_EXPORT ScopedBufferBinder {
|
| ~ScopedBufferBinder();
|
|
|
| private:
|
| - // TODO(dcastagna): Use GLStateRestorer.
|
| + // Whenever possible we prefer to use the current GLContext's
|
| + // GLStateRestorer to maximize driver compabitility.
|
| + GLStateRestorer* state_restorer_;
|
| +
|
| + // Failing that we use GL calls to save and restore state.
|
| int target_;
|
| int old_id_;
|
|
|
|
|