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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class Lock; | 24 class Lock; |
25 } | 25 } |
26 | 26 |
27 namespace gfx { | 27 namespace gfx { |
28 class GpuMemoryBuffer; | 28 class GpuMemoryBuffer; |
29 } | 29 } |
30 | 30 |
31 namespace gpu { | 31 namespace gpu { |
32 class GpuControlClient; | |
33 struct SyncToken; | 32 struct SyncToken; |
34 | 33 |
35 // Common interface for GpuControl implementations. | 34 // Common interface for GpuControl implementations. |
36 class GPU_EXPORT GpuControl { | 35 class GPU_EXPORT GpuControl { |
37 public: | 36 public: |
38 GpuControl() {} | 37 GpuControl() {} |
39 virtual ~GpuControl() {} | 38 virtual ~GpuControl() {} |
40 | 39 |
41 virtual void SetGpuControlClient(GpuControlClient* gpu_control_client) = 0; | |
42 | |
43 virtual Capabilities GetCapabilities() = 0; | 40 virtual Capabilities GetCapabilities() = 0; |
44 | 41 |
45 // Create an image for a client buffer with the given dimensions and | 42 // Create an image for a client buffer with the given dimensions and |
46 // format. Returns its ID or -1 on error. | 43 // format. Returns its ID or -1 on error. |
47 virtual int32_t CreateImage(ClientBuffer buffer, | 44 virtual int32_t CreateImage(ClientBuffer buffer, |
48 size_t width, | 45 size_t width, |
49 size_t height, | 46 size_t height, |
50 unsigned internalformat) = 0; | 47 unsigned internalformat) = 0; |
51 | 48 |
52 // Destroy an image. The ID must be positive. | 49 // Destroy an image. The ID must be positive. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // be enqueued first so does not need to be flushed. | 109 // be enqueued first so does not need to be flushed. |
113 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 110 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
114 | 111 |
115 private: | 112 private: |
116 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 113 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
117 }; | 114 }; |
118 | 115 |
119 } // namespace gpu | 116 } // namespace gpu |
120 | 117 |
121 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 118 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |