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 COMPONENTS_VIEW_MANAGER_GLES2_COMMAND_BUFFER_DRIVER_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_GLES2_COMMAND_BUFFER_DRIVER_H_ |
6 #define COMPONENTS_VIEW_MANAGER_GLES2_COMMAND_BUFFER_DRIVER_H_ | 6 #define COMPONENTS_VIEW_MANAGER_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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 mojo::CommandBufferLostContextObserverPtr loss_observer, | 66 mojo::CommandBufferLostContextObserverPtr loss_observer, |
67 mojo::ScopedSharedBufferHandle shared_state); | 67 mojo::ScopedSharedBufferHandle shared_state); |
68 void SetGetBuffer(int32_t buffer); | 68 void SetGetBuffer(int32_t buffer); |
69 void Flush(int32_t put_offset); | 69 void Flush(int32_t put_offset); |
70 void MakeProgress(int32_t last_get_offset); | 70 void MakeProgress(int32_t last_get_offset); |
71 void RegisterTransferBuffer(int32_t id, | 71 void RegisterTransferBuffer(int32_t id, |
72 mojo::ScopedSharedBufferHandle transfer_buffer, | 72 mojo::ScopedSharedBufferHandle transfer_buffer, |
73 uint32_t size); | 73 uint32_t size); |
74 void DestroyTransferBuffer(int32_t id); | 74 void DestroyTransferBuffer(int32_t id); |
75 void Echo(const mojo::Callback<void()>& callback); | 75 void Echo(const mojo::Callback<void()>& callback); |
| 76 void CreateImage(int32_t id, |
| 77 mojo::ScopedHandle memory_handle, |
| 78 int32_t type, |
| 79 mojo::SizePtr size, |
| 80 int32_t format, |
| 81 int32_t internal_format); |
| 82 void DestroyImage(int32_t id); |
76 | 83 |
77 // Called at shutdown to destroy the X window. This is needed when the parent | 84 // Called at shutdown to destroy the X window. This is needed when the parent |
78 // window is being destroyed. Otherwise X calls for this window will fail. | 85 // window is being destroyed. Otherwise X calls for this window will fail. |
79 void DestroyWindow(); | 86 void DestroyWindow(); |
80 | 87 |
81 private: | 88 private: |
82 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); | 89 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); |
83 void OnResize(gfx::Size size, float scale_factor); | 90 void OnResize(gfx::Size size, float scale_factor); |
84 bool OnWaitSyncPoint(uint32_t sync_point); | 91 bool OnWaitSyncPoint(uint32_t sync_point); |
85 void OnSyncPointRetired(); | 92 void OnSyncPointRetired(); |
(...skipping 22 matching lines...) Expand all Loading... |
108 base::Callback<void(CommandBufferDriver*)> destruct_callback_; | 115 base::Callback<void(CommandBufferDriver*)> destruct_callback_; |
109 | 116 |
110 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 117 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
111 | 118 |
112 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 119 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
113 }; | 120 }; |
114 | 121 |
115 } // namespace gles2 | 122 } // namespace gles2 |
116 | 123 |
117 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 124 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
OLD | NEW |