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_SERVICE_GPU_PROCESSOR_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
7 | 7 |
8 #include "app/surface/transport_dib.h" | 8 #include "app/surface/transport_dib.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // user's swap buffers callback. | 91 // user's swap buffers callback. |
92 virtual void WillSwapBuffers(); | 92 virtual void WillSwapBuffers(); |
93 | 93 |
94 // The GPUProcessor holds a weak reference to the CommandBuffer. The | 94 // The GPUProcessor holds a weak reference to the CommandBuffer. The |
95 // CommandBuffer owns the GPUProcessor and holds a strong reference to it | 95 // CommandBuffer owns the GPUProcessor and holds a strong reference to it |
96 // through the ProcessCommands callback. | 96 // through the ProcessCommands callback. |
97 CommandBuffer* command_buffer_; | 97 CommandBuffer* command_buffer_; |
98 | 98 |
99 int commands_per_update_; | 99 int commands_per_update_; |
100 | 100 |
| 101 // TODO(gman): Group needs to be passed in so it can be shared by |
| 102 // multiple GPUProcessors. |
101 gles2::ContextGroup group_; | 103 gles2::ContextGroup group_; |
102 scoped_ptr<gles2::GLES2Decoder> decoder_; | 104 scoped_ptr<gles2::GLES2Decoder> decoder_; |
103 scoped_ptr<CommandParser> parser_; | 105 scoped_ptr<CommandParser> parser_; |
104 scoped_ptr<gfx::GLContext> context_; | 106 scoped_ptr<gfx::GLContext> context_; |
105 | 107 |
106 #if defined(OS_MACOSX) | 108 #if defined(OS_MACOSX) |
107 scoped_ptr<AcceleratedSurface> surface_; | 109 scoped_ptr<AcceleratedSurface> surface_; |
108 #endif | 110 #endif |
109 | 111 |
110 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; | 112 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; |
111 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; | 113 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; |
112 }; | 114 }; |
113 | 115 |
114 } // namespace gpu | 116 } // namespace gpu |
115 | 117 |
116 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 118 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
OLD | NEW |