| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This API is consistent with other OpenGL setup APIs like window's WGL | 5 // This API is consistent with other OpenGL setup APIs like window's WGL |
| 6 // and pepper's PGL. This API is used to manage OpenGL RendererGLContexts in the | 6 // and pepper's PGL. This API is used to manage OpenGL RendererGLContexts in the |
| 7 // Chrome renderer process in a way that is consistent with other platforms. | 7 // Chrome renderer process in a way that is consistent with other platforms. |
| 8 | 8 |
| 9 #ifndef CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ | 9 #ifndef CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ |
| 10 #define CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ | 10 #define CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // EGL. Attributes are matched using a closest fit algorithm. | 46 // EGL. Attributes are matched using a closest fit algorithm. |
| 47 enum Attribute { | 47 enum Attribute { |
| 48 ALPHA_SIZE = 0x3021, | 48 ALPHA_SIZE = 0x3021, |
| 49 BLUE_SIZE = 0x3022, | 49 BLUE_SIZE = 0x3022, |
| 50 GREEN_SIZE = 0x3023, | 50 GREEN_SIZE = 0x3023, |
| 51 RED_SIZE = 0x3024, | 51 RED_SIZE = 0x3024, |
| 52 DEPTH_SIZE = 0x3025, | 52 DEPTH_SIZE = 0x3025, |
| 53 STENCIL_SIZE = 0x3026, | 53 STENCIL_SIZE = 0x3026, |
| 54 SAMPLES = 0x3031, | 54 SAMPLES = 0x3031, |
| 55 SAMPLE_BUFFERS = 0x3032, | 55 SAMPLE_BUFFERS = 0x3032, |
| 56 HEIGHT = 0x3056, |
| 57 WIDTH = 0x3057, |
| 56 NONE = 0x3038 // Attrib list = terminator | 58 NONE = 0x3038 // Attrib list = terminator |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 // Reasons that a lost context might have been provoked. | 61 // Reasons that a lost context might have been provoked. |
| 60 enum ContextLostReason { | 62 enum ContextLostReason { |
| 61 // This context definitely provoked the loss of context. | 63 // This context definitely provoked the loss of context. |
| 62 kGuilty, | 64 kGuilty, |
| 63 | 65 |
| 64 // This context definitely did not provoke the loss of context. | 66 // This context definitely did not provoke the loss of context. |
| 65 kInnocent, | 67 kInnocent, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 int32 transfer_buffer_id_; | 207 int32 transfer_buffer_id_; |
| 206 gpu::gles2::GLES2Implementation* gles2_implementation_; | 208 gpu::gles2::GLES2Implementation* gles2_implementation_; |
| 207 gfx::Size size_; | 209 gfx::Size size_; |
| 208 Error last_error_; | 210 Error last_error_; |
| 209 int frame_number_; | 211 int frame_number_; |
| 210 | 212 |
| 211 DISALLOW_COPY_AND_ASSIGN(RendererGLContext); | 213 DISALLOW_COPY_AND_ASSIGN(RendererGLContext); |
| 212 }; | 214 }; |
| 213 | 215 |
| 214 #endif // CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ | 216 #endif // CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ |
| OLD | NEW |