| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Gets the associated ContextGroup | 103 // Gets the associated ContextGroup |
| 104 virtual ContextGroup* GetContextGroup() = 0; | 104 virtual ContextGroup* GetContextGroup() = 0; |
| 105 | 105 |
| 106 // Sets a callback which is called when a glResizeCHROMIUM command | 106 // Sets a callback which is called when a glResizeCHROMIUM command |
| 107 // is processed. | 107 // is processed. |
| 108 virtual void SetResizeCallback(Callback1<gfx::Size>::Type* callback) = 0; | 108 virtual void SetResizeCallback(Callback1<gfx::Size>::Type* callback) = 0; |
| 109 | 109 |
| 110 // Sets a callback which is called when a SwapBuffers command is processed. | 110 // Sets a callback which is called when a SwapBuffers command is processed. |
| 111 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; | 111 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; |
| 112 | 112 |
| 113 // Sets a callback which is called after a Set/WaitLatch command is processed. |
| 114 // The bool parameter will be true for SetLatch, and false for a WaitLatch |
| 115 // that is blocked. An unblocked WaitLatch will not trigger a callback. |
| 116 virtual void SetLatchCallback(const base::Callback<void(bool)>& callback) = 0; |
| 117 |
| 113 // Get the service texture ID corresponding to a client texture ID. | 118 // Get the service texture ID corresponding to a client texture ID. |
| 114 // If no such record is found then return false. | 119 // If no such record is found then return false. |
| 115 virtual bool GetServiceTextureId(uint32 client_texture_id, | 120 virtual bool GetServiceTextureId(uint32 client_texture_id, |
| 116 uint32* service_texture_id); | 121 uint32* service_texture_id); |
| 117 | 122 |
| 118 // Provides detail about a lost context if one occurred. | 123 // Provides detail about a lost context if one occurred. |
| 119 virtual error::ContextLostReason GetContextLostReason() = 0; | 124 virtual error::ContextLostReason GetContextLostReason() = 0; |
| 120 | 125 |
| 121 protected: | 126 protected: |
| 122 GLES2Decoder(); | 127 GLES2Decoder(); |
| 123 | 128 |
| 124 private: | 129 private: |
| 125 bool debug_; | 130 bool debug_; |
| 126 | 131 |
| 127 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 132 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 128 }; | 133 }; |
| 129 | 134 |
| 130 } // namespace gles2 | 135 } // namespace gles2 |
| 131 } // namespace gpu | 136 } // namespace gpu |
| 132 | 137 |
| 133 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 138 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |