| 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> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/callback_old.h" | |
| 14 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 15 #include "gpu/command_buffer/service/common_decoder.h" | 14 #include "gpu/command_buffer/service/common_decoder.h" |
| 16 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
| 17 | 16 |
| 18 namespace gfx { | 17 namespace gfx { |
| 19 class GLContext; | 18 class GLContext; |
| 20 class GLSurface; | 19 class GLSurface; |
| 21 } | 20 } |
| 22 | 21 |
| 23 namespace gpu { | 22 namespace gpu { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 99 |
| 101 // Gets the associated GLContext. | 100 // Gets the associated GLContext. |
| 102 virtual gfx::GLContext* GetGLContext() = 0; | 101 virtual gfx::GLContext* GetGLContext() = 0; |
| 103 | 102 |
| 104 // Gets the associated ContextGroup | 103 // Gets the associated ContextGroup |
| 105 virtual ContextGroup* GetContextGroup() = 0; | 104 virtual ContextGroup* GetContextGroup() = 0; |
| 106 | 105 |
| 107 // Sets a callback which is called when a glResizeCHROMIUM command | 106 // Sets a callback which is called when a glResizeCHROMIUM command |
| 108 // is processed. | 107 // is processed. |
| 109 virtual void SetResizeCallback( | 108 virtual void SetResizeCallback( |
| 110 Callback1<gfx::Size>::Type* callback) = 0; | 109 const base::Callback<void(gfx::Size)>& callback) = 0; |
| 111 | 110 |
| 112 // Sets a callback which is called when a SwapBuffers command is processed. | 111 // Sets a callback which is called when a SwapBuffers command is processed. |
| 113 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; | 112 virtual void SetSwapBuffersCallback(const base::Closure& callback) = 0; |
| 114 | 113 |
| 115 virtual void SetStreamTextureManager(StreamTextureManager* manager) = 0; | 114 virtual void SetStreamTextureManager(StreamTextureManager* manager) = 0; |
| 116 | 115 |
| 117 // Get the service texture ID corresponding to a client texture ID. | 116 // Get the service texture ID corresponding to a client texture ID. |
| 118 // If no such record is found then return false. | 117 // If no such record is found then return false. |
| 119 virtual bool GetServiceTextureId(uint32 client_texture_id, | 118 virtual bool GetServiceTextureId(uint32 client_texture_id, |
| 120 uint32* service_texture_id); | 119 uint32* service_texture_id); |
| 121 | 120 |
| 122 // Provides detail about a lost context if one occurred. | 121 // Provides detail about a lost context if one occurred. |
| 123 virtual error::ContextLostReason GetContextLostReason() = 0; | 122 virtual error::ContextLostReason GetContextLostReason() = 0; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 140 private: | 139 private: |
| 141 bool debug_; | 140 bool debug_; |
| 142 | 141 |
| 143 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 142 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 144 }; | 143 }; |
| 145 | 144 |
| 146 } // namespace gles2 | 145 } // namespace gles2 |
| 147 } // namespace gpu | 146 } // namespace gpu |
| 148 | 147 |
| 149 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 148 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |