| OLD | NEW |
| 1 // Copyright (c) 2011 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
| 15 #include "gpu/command_buffer/common/command_buffer.h" | 15 #include "gpu/command_buffer/common/command_buffer.h" |
| 16 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 16 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
| 17 #include "gpu/command_buffer/service/cmd_parser.h" | 17 #include "gpu/command_buffer/service/cmd_parser.h" |
| 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 19 #include "gpu/gpu_export.h" |
| 19 | 20 |
| 20 namespace gfx { | 21 namespace gfx { |
| 21 class GLFence; | 22 class GLFence; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace gpu { | 25 namespace gpu { |
| 25 | 26 |
| 26 // This class schedules commands that have been flushed. They are received via | 27 // This class schedules commands that have been flushed. They are received via |
| 27 // a command buffer and forwarded to a command parser. TODO(apatrick): This | 28 // a command buffer and forwarded to a command parser. TODO(apatrick): This |
| 28 // class should not know about the decoder. Do not add additional dependencies | 29 // class should not know about the decoder. Do not add additional dependencies |
| 29 // on it. | 30 // on it. |
| 30 class GpuScheduler | 31 class GPU_EXPORT GpuScheduler |
| 31 : public CommandBufferEngine, | 32 : NON_EXPORTED_BASE(public CommandBufferEngine), |
| 32 public base::SupportsWeakPtr<GpuScheduler> { | 33 public base::SupportsWeakPtr<GpuScheduler> { |
| 33 public: | 34 public: |
| 34 GpuScheduler(CommandBuffer* command_buffer, | 35 GpuScheduler(CommandBuffer* command_buffer, |
| 35 AsyncAPIInterface* handler, | 36 AsyncAPIInterface* handler, |
| 36 gles2::GLES2Decoder* decoder); | 37 gles2::GLES2Decoder* decoder); |
| 37 | 38 |
| 38 virtual ~GpuScheduler(); | 39 virtual ~GpuScheduler(); |
| 39 | 40 |
| 40 void PutChanged(); | 41 void PutChanged(); |
| 41 | 42 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 base::Closure scheduled_callback_; | 123 base::Closure scheduled_callback_; |
| 123 base::Closure command_processed_callback_; | 124 base::Closure command_processed_callback_; |
| 124 | 125 |
| 125 DISALLOW_COPY_AND_ASSIGN(GpuScheduler); | 126 DISALLOW_COPY_AND_ASSIGN(GpuScheduler); |
| 126 }; | 127 }; |
| 127 | 128 |
| 128 } // namespace gpu | 129 } // namespace gpu |
| 129 | 130 |
| 130 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 131 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
| OLD | NEW |