| OLD | NEW |
| 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_GL_SURFACE_H_ | 5 #ifndef UI_GL_GL_SURFACE_H_ |
| 6 #define UI_GL_GL_SURFACE_H_ | 6 #define UI_GL_GL_SURFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 bool software, | 112 bool software, |
| 113 const gfx::Size& size); | 113 const gfx::Size& size); |
| 114 | 114 |
| 115 static GLSurface* GetCurrent(); | 115 static GLSurface* GetCurrent(); |
| 116 | 116 |
| 117 protected: | 117 protected: |
| 118 virtual ~GLSurface(); | 118 virtual ~GLSurface(); |
| 119 static bool InitializeOneOffInternal(); | 119 static bool InitializeOneOffInternal(); |
| 120 static void SetCurrent(GLSurface* surface); | 120 static void SetCurrent(GLSurface* surface); |
| 121 | 121 |
| 122 static bool ExtensionsContain(const char* extensions, const char* name); |
| 123 |
| 122 private: | 124 private: |
| 123 friend class base::RefCounted<GLSurface>; | 125 friend class base::RefCounted<GLSurface>; |
| 124 friend class GLContext; | 126 friend class GLContext; |
| 125 | 127 |
| 126 DISALLOW_COPY_AND_ASSIGN(GLSurface); | 128 DISALLOW_COPY_AND_ASSIGN(GLSurface); |
| 127 }; | 129 }; |
| 128 | 130 |
| 129 // Implementation of GLSurface that forwards all calls through to another | 131 // Implementation of GLSurface that forwards all calls through to another |
| 130 // GLSurface. | 132 // GLSurface. |
| 131 class GL_EXPORT GLSurfaceAdapter : public GLSurface { | 133 class GL_EXPORT GLSurfaceAdapter : public GLSurface { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 159 | 161 |
| 160 private: | 162 private: |
| 161 scoped_refptr<GLSurface> surface_; | 163 scoped_refptr<GLSurface> surface_; |
| 162 | 164 |
| 163 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 165 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 164 }; | 166 }; |
| 165 | 167 |
| 166 } // namespace gfx | 168 } // namespace gfx |
| 167 | 169 |
| 168 #endif // UI_GL_GL_SURFACE_H_ | 170 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |