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 file contains the GLES2Decoder class. | 5 // This file contains the GLES2Decoder class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 virtual gfx::GLContext* GetGLContext() = 0; | 96 virtual gfx::GLContext* GetGLContext() = 0; |
97 | 97 |
98 // Gets the associated ContextGroup | 98 // Gets the associated ContextGroup |
99 virtual ContextGroup* GetContextGroup() = 0; | 99 virtual ContextGroup* GetContextGroup() = 0; |
100 | 100 |
101 // Sets a callback which is called when a glResizeCHROMIUM command | 101 // Sets a callback which is called when a glResizeCHROMIUM command |
102 // is processed. | 102 // is processed. |
103 virtual void SetResizeCallback( | 103 virtual void SetResizeCallback( |
104 Callback1<gfx::Size>::Type* callback) = 0; | 104 Callback1<gfx::Size>::Type* callback) = 0; |
105 | 105 |
| 106 #if defined(OS_MACOSX) |
106 // Sets a callback which is called when a SwapBuffers command is processed. | 107 // Sets a callback which is called when a SwapBuffers command is processed. |
107 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; | 108 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; |
| 109 #endif |
108 | 110 |
109 // Get the service texture ID corresponding to a client texture ID. | 111 // Get the service texture ID corresponding to a client texture ID. |
110 // If no such record is found then return false. | 112 // If no such record is found then return false. |
111 virtual bool GetServiceTextureId(uint32 client_texture_id, | 113 virtual bool GetServiceTextureId(uint32 client_texture_id, |
112 uint32* service_texture_id); | 114 uint32* service_texture_id); |
113 | 115 |
114 // Provides detail about a lost context if one occurred. | 116 // Provides detail about a lost context if one occurred. |
115 virtual error::ContextLostReason GetContextLostReason() = 0; | 117 virtual error::ContextLostReason GetContextLostReason() = 0; |
116 | 118 |
117 protected: | 119 protected: |
118 GLES2Decoder(); | 120 GLES2Decoder(); |
119 | 121 |
120 private: | 122 private: |
121 bool debug_; | 123 bool debug_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 125 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace gles2 | 128 } // namespace gles2 |
127 } // namespace gpu | 129 } // namespace gpu |
128 | 130 |
129 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 131 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |