| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 7 | 7 |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 9 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
| 10 #include "gpu/command_buffer/client/id_allocator.h" | 10 #include "gpu/command_buffer/client/id_allocator.h" |
| 11 #include "gpu/command_buffer/client/fenced_allocator.h" | 11 #include "gpu/command_buffer/client/fenced_allocator.h" |
| 12 | 12 |
| 13 namespace gpu { | 13 namespace gpu { |
| 14 namespace gles2 { | 14 namespace gles2 { |
| 15 | 15 |
| 16 // This class emulates GLES2 over command buffers. It can be used by a client | 16 // This class emulates GLES2 over command buffers. It can be used by a client |
| 17 // program so that the program does not need deal with shared memory and command | 17 // program so that the program does not need deal with shared memory and command |
| 18 // buffer management. See gl2_lib.h. Note that there is a performance gain to | 18 // buffer management. See gl2_lib.h. Note that there is a performance gain to |
| 19 // be had by changing your code to use command buffers directly by using the | 19 // be had by changing your code to use command buffers directly by using the |
| 20 // GLES2CmdHelper but that entails changing your code to use and deal with | 20 // GLES2CmdHelper but that entails changing your code to use and deal with |
| 21 // shared memory and synchronization issues. | 21 // shared memory and synchronization issues. |
| 22 class GLES2Implementation { | 22 class GLES2Implementation { |
| 23 public: | 23 public: |
| 24 GLES2Implementation( | 24 GLES2Implementation( |
| 25 GLES2CmdHelper* helper, | 25 GLES2CmdHelper* helper, |
| 26 size_t transfer_buffer_size, | 26 size_t transfer_buffer_size, |
| 27 void* transfer_buffer, | 27 void* transfer_buffer, |
| 28 int32 transfer_buffer_id); | 28 int32 transfer_buffer_id); |
| 29 | 29 |
| 30 ~GLES2Implementation(); |
| 31 |
| 30 // The GLES2CmdHelper being used by this GLES2Implementation. You can use | 32 // The GLES2CmdHelper being used by this GLES2Implementation. You can use |
| 31 // this to issue cmds at a lower level for certain kinds of optimization. | 33 // this to issue cmds at a lower level for certain kinds of optimization. |
| 32 GLES2CmdHelper* helper() const { | 34 GLES2CmdHelper* helper() const { |
| 33 return helper_; | 35 return helper_; |
| 34 } | 36 } |
| 35 | 37 |
| 36 // Include the auto-generated part of this class. We split this because | 38 // Include the auto-generated part of this class. We split this because |
| 37 // it means we can easily edit the non-auto generated parts right here in | 39 // it means we can easily edit the non-auto generated parts right here in |
| 38 // this file instead of having to edit some template or the code generator. | 40 // this file instead of having to edit some template or the code generator. |
| 39 #include "gpu/command_buffer/client/gles2_implementation_autogen.h" | 41 #include "gpu/command_buffer/client/gles2_implementation_autogen.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); | 86 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 | 89 |
| 88 } // namespace gles2 | 90 } // namespace gles2 |
| 89 } // namespace gpu | 91 } // namespace gpu |
| 90 | 92 |
| 91 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 93 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 92 | 94 |
| OLD | NEW |