| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_MUS_GLES2_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef SERVICES_UI_GLES2_COMMAND_BUFFER_IMPL_H_ |
| 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_IMPL_H_ | 6 #define SERVICES_UI_GLES2_COMMAND_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "components/mus/gles2/command_buffer_driver.h" | |
| 16 #include "components/mus/public/interfaces/command_buffer.mojom.h" | |
| 17 #include "gpu/command_buffer/common/command_buffer.h" | 15 #include "gpu/command_buffer/common/command_buffer.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
| 17 #include "services/ui/gles2/command_buffer_driver.h" |
| 18 #include "services/ui/public/interfaces/command_buffer.mojom.h" |
| 19 | 19 |
| 20 namespace mus { | 20 namespace mus { |
| 21 | 21 |
| 22 class CommandBufferDriver; | 22 class CommandBufferDriver; |
| 23 class GpuState; | 23 class GpuState; |
| 24 | 24 |
| 25 // This class listens to the CommandBuffer message pipe on a low-latency thread | 25 // This class listens to the CommandBuffer message pipe on a low-latency thread |
| 26 // so that we can insert sync points without blocking on the GL driver. It | 26 // so that we can insert sync points without blocking on the GL driver. It |
| 27 // forwards most method calls to the CommandBufferDriver, which runs on the | 27 // forwards most method calls to the CommandBufferDriver, which runs on the |
| 28 // same thread as the native viewport. | 28 // same thread as the native viewport. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 scoped_refptr<GpuState> gpu_state_; | 116 scoped_refptr<GpuState> gpu_state_; |
| 117 std::unique_ptr<CommandBufferDriver> driver_; | 117 std::unique_ptr<CommandBufferDriver> driver_; |
| 118 std::unique_ptr<mojo::Binding<CommandBuffer>> binding_; | 118 std::unique_ptr<mojo::Binding<CommandBuffer>> binding_; |
| 119 mojom::CommandBufferClientPtr client_; | 119 mojom::CommandBufferClientPtr client_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(CommandBufferImpl); | 121 DISALLOW_COPY_AND_ASSIGN(CommandBufferImpl); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace mus | 124 } // namespace mus |
| 125 | 125 |
| 126 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_IMPL_H_ | 126 #endif // SERVICES_UI_GLES2_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |