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); | |
83 | 76 |
84 // Called at shutdown to destroy the X window. This is needed when the parent | 77 // Called at shutdown to destroy the X window. This is needed when the parent |
85 // window is being destroyed. Otherwise X calls for this window will fail. | 78 // window is being destroyed. Otherwise X calls for this window will fail. |
86 void DestroyWindow(); | 79 void DestroyWindow(); |
87 | 80 |
88 private: | 81 private: |
89 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); | 82 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state); |
90 void OnResize(gfx::Size size, float scale_factor); | 83 void OnResize(gfx::Size size, float scale_factor); |
91 bool OnWaitSyncPoint(uint32_t sync_point); | 84 bool OnWaitSyncPoint(uint32_t sync_point); |
92 void OnSyncPointRetired(); | 85 void OnSyncPointRetired(); |
(...skipping 22 matching lines...) Expand all Loading... |
115 base::Callback<void(CommandBufferDriver*)> destruct_callback_; | 108 base::Callback<void(CommandBufferDriver*)> destruct_callback_; |
116 | 109 |
117 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 110 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
118 | 111 |
119 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 112 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
120 }; | 113 }; |
121 | 114 |
122 } // namespace gles2 | 115 } // namespace gles2 |
123 | 116 |
124 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 117 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
OLD | NEW |