OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_GFX_GL_GL_CONTEXT_H_ | 5 #ifndef APP_GFX_GL_GL_CONTEXT_H_ |
6 #define APP_GFX_GL_GL_CONTEXT_H_ | 6 #define APP_GFX_GL_GL_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Get the size of the back buffer. | 39 // Get the size of the back buffer. |
40 virtual gfx::Size GetSize() = 0; | 40 virtual gfx::Size GetSize() = 0; |
41 | 41 |
42 // Get the underlying platform specific GL context "handle". | 42 // Get the underlying platform specific GL context "handle". |
43 virtual void* GetHandle() = 0; | 43 virtual void* GetHandle() = 0; |
44 | 44 |
45 // Set swap interval. This context must be current. | 45 // Set swap interval. This context must be current. |
46 virtual void SetSwapInterval(int interval) = 0; | 46 virtual void SetSwapInterval(int interval) = 0; |
47 | 47 |
| 48 // Returns the internal frame buffer object name if the context is backed by |
| 49 // FBO. Otherwise returns 0. |
| 50 virtual unsigned int GetBackingFrameBufferObject(); |
| 51 |
48 // Returns space separated list of extensions. The context must be current. | 52 // Returns space separated list of extensions. The context must be current. |
49 virtual std::string GetExtensions(); | 53 virtual std::string GetExtensions(); |
50 | 54 |
51 // Returns whether the current context supports the named extension. The | 55 // Returns whether the current context supports the named extension. The |
52 // context must be current. | 56 // context must be current. |
53 bool HasExtension(const char* name); | 57 bool HasExtension(const char* name); |
54 | 58 |
55 static bool InitializeOneOff(); | 59 static bool InitializeOneOff(); |
56 | 60 |
57 #if !defined(OS_MACOSX) | 61 #if !defined(OS_MACOSX) |
(...skipping 11 matching lines...) Expand all Loading... |
69 protected: | 73 protected: |
70 bool InitializeCommon(); | 74 bool InitializeCommon(); |
71 | 75 |
72 private: | 76 private: |
73 DISALLOW_COPY_AND_ASSIGN(GLContext); | 77 DISALLOW_COPY_AND_ASSIGN(GLContext); |
74 }; | 78 }; |
75 | 79 |
76 } // namespace gfx | 80 } // namespace gfx |
77 | 81 |
78 #endif // APP_GFX_GL_GL_CONTEXT_H_ | 82 #endif // APP_GFX_GL_GL_CONTEXT_H_ |
OLD | NEW |