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_EGL_H_ | 5 #ifndef APP_GFX_GL_GL_CONTEXT_EGL_H_ |
6 #define APP_GFX_GL_GL_CONTEXT_EGL_H_ | 6 #define APP_GFX_GL_GL_CONTEXT_EGL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "gfx/size.h" | 9 #include "gfx/size.h" |
10 #include "app/gfx/gl/gl_context.h" | 10 #include "app/gfx/gl/gl_context.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // Initialize an EGL context. | 45 // Initialize an EGL context. |
46 bool Initialize(); | 46 bool Initialize(); |
47 | 47 |
48 // Implement GLContext. | 48 // Implement GLContext. |
49 virtual void Destroy(); | 49 virtual void Destroy(); |
50 virtual bool MakeCurrent(); | 50 virtual bool MakeCurrent(); |
51 virtual bool IsCurrent(); | 51 virtual bool IsCurrent(); |
52 virtual bool IsOffscreen(); | 52 virtual bool IsOffscreen(); |
53 virtual bool SwapBuffers(); | 53 virtual bool SwapBuffers(); |
| 54 virtual void SetSize(gfx::Size); |
54 virtual gfx::Size GetSize(); | 55 virtual gfx::Size GetSize(); |
55 virtual void* GetHandle(); | 56 virtual void* GetHandle(); |
56 virtual void SetSwapInterval(int interval); | 57 virtual void SetSwapInterval(int interval); |
57 | 58 |
58 // Implement BaseEGLContext. | 59 // Implement BaseEGLContext. |
59 virtual EGLSurface GetSurface(); | 60 virtual EGLSurface GetSurface(); |
60 | 61 |
61 private: | 62 private: |
62 void* window_; | 63 void* window_; |
63 EGLSurface surface_; | 64 EGLSurface surface_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 EGLSurface surface_; | 97 EGLSurface surface_; |
97 bool own_surface_; | 98 bool own_surface_; |
98 EGLContext context_; | 99 EGLContext context_; |
99 | 100 |
100 DISALLOW_COPY_AND_ASSIGN(SecondaryEGLContext); | 101 DISALLOW_COPY_AND_ASSIGN(SecondaryEGLContext); |
101 }; | 102 }; |
102 | 103 |
103 } // namespace gfx | 104 } // namespace gfx |
104 | 105 |
105 #endif // APP_GFX_GL_GL_CONTEXT_EGL_H_ | 106 #endif // APP_GFX_GL_GL_CONTEXT_EGL_H_ |
OLD | NEW |