| 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 GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "gpu/command_buffer/common/capabilities.h" | 14 #include "gpu/command_buffer/common/capabilities.h" |
| 15 #include "gpu/command_buffer/common/constants.h" |
| 15 #include "gpu/command_buffer/common/mailbox.h" | 16 #include "gpu/command_buffer/common/mailbox.h" |
| 16 #include "gpu/gpu_export.h" | 17 #include "gpu/gpu_export.h" |
| 17 | 18 |
| 18 extern "C" typedef struct _ClientBuffer* ClientBuffer; | 19 extern "C" typedef struct _ClientBuffer* ClientBuffer; |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class Lock; | 22 class Lock; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace gfx { | 25 namespace gfx { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Sets a lock this will be held on every callback from the GPU | 83 // Sets a lock this will be held on every callback from the GPU |
| 83 // implementation. This lock must be set and must be held on every call into | 84 // implementation. This lock must be set and must be held on every call into |
| 84 // the GPU implementation if it is to be used from multiple threads. This | 85 // the GPU implementation if it is to be used from multiple threads. This |
| 85 // may not be supported with all implementations. | 86 // may not be supported with all implementations. |
| 86 virtual void SetLock(base::Lock*) = 0; | 87 virtual void SetLock(base::Lock*) = 0; |
| 87 | 88 |
| 88 // Returns true if the channel to the Gpu is lost. When true, all contexts | 89 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 89 // should be considered as lost. | 90 // should be considered as lost. |
| 90 virtual bool IsGpuChannelLost() = 0; | 91 virtual bool IsGpuChannelLost() = 0; |
| 91 | 92 |
| 93 // The namespace and command buffer ID forms a unique pair for all existing |
| 94 // GpuControl (on client) and matches for the corresponding command buffer |
| 95 // (on server) in a single server process. |
| 96 virtual CommandBufferNamespace GetNamespaceID() const = 0; |
| 97 virtual uint64_t GetCommandBufferID() const = 0; |
| 98 |
| 92 private: | 99 private: |
| 93 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 100 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 94 }; | 101 }; |
| 95 | 102 |
| 96 } // namespace gpu | 103 } // namespace gpu |
| 97 | 104 |
| 98 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 105 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |