OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ | 5 #ifndef SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ |
6 #define SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ | 6 #define SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Onscreen. | 51 // Onscreen. |
52 CommandBufferDriver(gfx::AcceleratedWidget widget, | 52 CommandBufferDriver(gfx::AcceleratedWidget widget, |
53 gfx::GLShareGroup* share_group, | 53 gfx::GLShareGroup* share_group, |
54 gpu::gles2::MailboxManager* mailbox_manager, | 54 gpu::gles2::MailboxManager* mailbox_manager, |
55 gpu::SyncPointManager* sync_point_manager, | 55 gpu::SyncPointManager* sync_point_manager, |
56 const gfx::SurfaceConfiguration& requested_configuration); | 56 const gfx::SurfaceConfiguration& requested_configuration); |
57 ~CommandBufferDriver(); | 57 ~CommandBufferDriver(); |
58 | 58 |
59 void set_client(scoped_ptr<Client> client) { client_ = client.Pass(); } | 59 void set_client(scoped_ptr<Client> client) { client_ = client.Pass(); } |
60 | 60 |
61 void Initialize(mojo::CommandBufferSyncClientPtr sync_client, | 61 void Initialize( |
62 mojo::CommandBufferLostContextObserverPtr loss_observer, | 62 mojo::InterfaceHandle<mojo::CommandBufferSyncClient> sync_client, |
63 mojo::ScopedSharedBufferHandle shared_state); | 63 mojo::InterfaceHandle<mojo::CommandBufferLostContextObserver> |
| 64 loss_observer, |
| 65 mojo::ScopedSharedBufferHandle shared_state); |
64 void SetGetBuffer(int32_t buffer); | 66 void SetGetBuffer(int32_t buffer); |
65 void Flush(int32_t put_offset); | 67 void Flush(int32_t put_offset); |
66 void MakeProgress(int32_t last_get_offset); | 68 void MakeProgress(int32_t last_get_offset); |
67 void RegisterTransferBuffer(int32_t id, | 69 void RegisterTransferBuffer(int32_t id, |
68 mojo::ScopedSharedBufferHandle transfer_buffer, | 70 mojo::ScopedSharedBufferHandle transfer_buffer, |
69 uint32_t size); | 71 uint32_t size); |
70 void DestroyTransferBuffer(int32_t id); | 72 void DestroyTransferBuffer(int32_t id); |
71 void Echo(const mojo::Callback<void()>& callback); | 73 void Echo(const mojo::Callback<void()>& callback); |
72 void RetireSyncPointOnGpuThread(uint32_t sync_point); | 74 void RetireSyncPointOnGpuThread(uint32_t sync_point); |
73 | 75 |
(...skipping 25 matching lines...) Expand all Loading... |
99 base::Callback<void(int32_t)> context_lost_callback_; | 101 base::Callback<void(int32_t)> context_lost_callback_; |
100 | 102 |
101 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 103 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
102 | 104 |
103 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 105 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
104 }; | 106 }; |
105 | 107 |
106 } // namespace gles2 | 108 } // namespace gles2 |
107 | 109 |
108 #endif // SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ | 110 #endif // SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ |
OLD | NEW |