| 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 GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ | 5 #ifndef GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ |
| 6 #define GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ | 6 #define GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" |
| 10 #include "gpu/command_buffer/common/mailbox.h" | 11 #include "gpu/command_buffer/common/mailbox.h" |
| 11 #include "gpu/command_buffer/common/types.h" | 12 #include "gpu/command_buffer/common/types.h" |
| 12 #include "gpu/gpu_export.h" | 13 #include "gpu/gpu_export.h" |
| 13 | 14 |
| 14 namespace gfx { | 15 namespace gfx { |
| 15 class GpuMemoryBuffer; | 16 class GpuMemoryBuffer; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace gpu { | 19 namespace gpu { |
| 19 | 20 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 int32* id) = 0; | 35 int32* id) = 0; |
| 35 | 36 |
| 36 // Destroy a gpu memory buffer. The ID must be positive. | 37 // Destroy a gpu memory buffer. The ID must be positive. |
| 37 virtual void DestroyGpuMemoryBuffer(int32 id) = 0; | 38 virtual void DestroyGpuMemoryBuffer(int32 id) = 0; |
| 38 | 39 |
| 39 // Generates n unique mailbox names that can be used with | 40 // Generates n unique mailbox names that can be used with |
| 40 // GL_texture_mailbox_CHROMIUM. | 41 // GL_texture_mailbox_CHROMIUM. |
| 41 virtual bool GenerateMailboxNames(unsigned num, | 42 virtual bool GenerateMailboxNames(unsigned num, |
| 42 std::vector<gpu::Mailbox>* names) = 0; | 43 std::vector<gpu::Mailbox>* names) = 0; |
| 43 | 44 |
| 45 // Inserts a sync point, returning its ID. Sync point IDs are global and can |
| 46 // be used for cross-context synchronization. |
| 47 virtual uint32 InsertSyncPoint() = 0; |
| 48 |
| 49 // Runs |callback| when a sync point is reached. |
| 50 virtual void SignalSyncPoint(uint32 sync_point, |
| 51 const base::Closure& callback) = 0; |
| 52 |
| 44 private: | 53 private: |
| 45 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 54 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 46 }; | 55 }; |
| 47 | 56 |
| 48 } // namespace gpu | 57 } // namespace gpu |
| 49 | 58 |
| 50 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ | 59 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ |
| OLD | NEW |