| 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> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "gpu/command_buffer/service/common_decoder.h" | 16 #include "gpu/command_buffer/service/common_decoder.h" |
| 17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
| 18 #include "ui/gl/gl_context.h" | 18 #include "ui/gl/gl_context.h" |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 class GLContext; | 21 class GLContext; |
| 22 class GLSurface; | 22 class GLSurface; |
| 23 class AsyncPixelTransferDelegate; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace gpu { | 26 namespace gpu { |
| 26 | 27 |
| 27 class StreamTextureManager; | 28 class StreamTextureManager; |
| 28 | 29 |
| 29 namespace gles2 { | 30 namespace gles2 { |
| 30 | 31 |
| 31 class ContextGroup; | 32 class ContextGroup; |
| 32 class GLES2Util; | 33 class GLES2Util; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // Process any pending queries. Returns false if there are no pending queries. | 151 // Process any pending queries. Returns false if there are no pending queries. |
| 151 virtual bool ProcessPendingQueries() = 0; | 152 virtual bool ProcessPendingQueries() = 0; |
| 152 | 153 |
| 153 // Sets a callback which is called when a glResizeCHROMIUM command | 154 // Sets a callback which is called when a glResizeCHROMIUM command |
| 154 // is processed. | 155 // is processed. |
| 155 virtual void SetResizeCallback( | 156 virtual void SetResizeCallback( |
| 156 const base::Callback<void(gfx::Size)>& callback) = 0; | 157 const base::Callback<void(gfx::Size)>& callback) = 0; |
| 157 | 158 |
| 158 virtual void SetStreamTextureManager(StreamTextureManager* manager) = 0; | 159 virtual void SetStreamTextureManager(StreamTextureManager* manager) = 0; |
| 159 | 160 |
| 161 // Interface to performing async pixel transfers. |
| 162 virtual gfx::AsyncPixelTransferDelegate* GetAsyncPixelTransferDelegate() = 0; |
| 163 virtual void SetAsyncPixelTransferDelegate( |
| 164 gfx::AsyncPixelTransferDelegate* delegate) = 0; |
| 165 |
| 160 // Get the service texture ID corresponding to a client texture ID. | 166 // Get the service texture ID corresponding to a client texture ID. |
| 161 // If no such record is found then return false. | 167 // If no such record is found then return false. |
| 162 virtual bool GetServiceTextureId(uint32 client_texture_id, | 168 virtual bool GetServiceTextureId(uint32 client_texture_id, |
| 163 uint32* service_texture_id); | 169 uint32* service_texture_id); |
| 164 | 170 |
| 165 // Provides detail about a lost context if one occurred. | 171 // Provides detail about a lost context if one occurred. |
| 166 virtual error::ContextLostReason GetContextLostReason() = 0; | 172 virtual error::ContextLostReason GetContextLostReason() = 0; |
| 167 | 173 |
| 168 // Clears a level of a texture | 174 // Clears a level of a texture |
| 169 // Returns false if a GL error should be generated. | 175 // Returns false if a GL error should be generated. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 bool log_synthesized_gl_errors_; | 211 bool log_synthesized_gl_errors_; |
| 206 static bool testing_force_is_angle_; | 212 static bool testing_force_is_angle_; |
| 207 | 213 |
| 208 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 214 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 209 }; | 215 }; |
| 210 | 216 |
| 211 } // namespace gles2 | 217 } // namespace gles2 |
| 212 } // namespace gpu | 218 } // namespace gpu |
| 213 | 219 |
| 214 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 220 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |