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 // 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 AsyncPixelTransferManager* manager) = 0; | 203 AsyncPixelTransferManager* manager) = 0; |
204 | 204 |
205 // Get the service texture ID corresponding to a client texture ID. | 205 // Get the service texture ID corresponding to a client texture ID. |
206 // If no such record is found then return false. | 206 // If no such record is found then return false. |
207 virtual bool GetServiceTextureId(uint32 client_texture_id, | 207 virtual bool GetServiceTextureId(uint32 client_texture_id, |
208 uint32* service_texture_id); | 208 uint32* service_texture_id); |
209 | 209 |
210 // Provides detail about a lost context if one occurred. | 210 // Provides detail about a lost context if one occurred. |
211 virtual error::ContextLostReason GetContextLostReason() = 0; | 211 virtual error::ContextLostReason GetContextLostReason() = 0; |
212 | 212 |
213 // Clears a level of a texture | 213 // Clears a level sub area of a texture |
214 // Returns false if a GL error should be generated. | 214 // Returns false if a GL error should be generated. |
215 virtual bool ClearLevel( | 215 virtual bool ClearLevel(Texture* texture, |
216 Texture* texture, | 216 unsigned target, |
217 unsigned target, | 217 int level, |
218 int level, | 218 unsigned format, |
219 unsigned internal_format, | 219 unsigned type, |
220 unsigned format, | 220 int xoffset, |
221 unsigned type, | 221 int yoffset, |
222 int width, | 222 int width, |
223 int height, | 223 int height) = 0; |
224 bool is_texture_immutable) = 0; | |
225 | 224 |
226 virtual ErrorState* GetErrorState() = 0; | 225 virtual ErrorState* GetErrorState() = 0; |
227 | 226 |
228 // A callback for messages from the decoder. | 227 // A callback for messages from the decoder. |
229 virtual void SetShaderCacheCallback(const ShaderCacheCallback& callback) = 0; | 228 virtual void SetShaderCacheCallback(const ShaderCacheCallback& callback) = 0; |
230 | 229 |
231 // Sets the callback for waiting on a sync point. The callback returns the | 230 // Sets the callback for waiting on a sync point. The callback returns the |
232 // scheduling status (i.e. true if the channel is still scheduled). | 231 // scheduling status (i.e. true if the channel is still scheduled). |
233 virtual void SetWaitSyncPointCallback( | 232 virtual void SetWaitSyncPointCallback( |
234 const WaitSyncPointCallback& callback) = 0; | 233 const WaitSyncPointCallback& callback) = 0; |
(...skipping 30 matching lines...) Expand all Loading... |
265 bool log_commands_; | 264 bool log_commands_; |
266 bool unsafe_es3_apis_enabled_; | 265 bool unsafe_es3_apis_enabled_; |
267 | 266 |
268 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 267 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
269 }; | 268 }; |
270 | 269 |
271 } // namespace gles2 | 270 } // namespace gles2 |
272 } // namespace gpu | 271 } // namespace gpu |
273 | 272 |
274 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 273 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |