| 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> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 namespace gpu { | 28 namespace gpu { |
| 29 | 29 |
| 30 // Common interface for GpuControl implementations. | 30 // Common interface for GpuControl implementations. |
| 31 class GPU_EXPORT GpuControl { | 31 class GPU_EXPORT GpuControl { |
| 32 public: | 32 public: |
| 33 GpuControl() {} | 33 GpuControl() {} |
| 34 virtual ~GpuControl() {} | 34 virtual ~GpuControl() {} |
| 35 | 35 |
| 36 virtual Capabilities GetCapabilities() = 0; | 36 virtual Capabilities GetCapabilities() = 0; |
| 37 | 37 |
| 38 // Create an image for a client buffer with the given dimensions and | 38 // Create an image for the client buffers with the given dimensions and |
| 39 // format. Returns its ID or -1 on error. | 39 // format. Returns its ID or -1 on error. |
| 40 virtual int32_t CreateImage(ClientBuffer buffer, | 40 virtual int32_t CreateImage(const ClientBuffer* const buffers, |
| 41 size_t width, | 41 size_t width, |
| 42 size_t height, | 42 size_t height, |
| 43 unsigned internalformat) = 0; | 43 unsigned internalformat) = 0; |
| 44 | 44 |
| 45 // Destroy an image. The ID must be positive. | 45 // Destroy an image. The ID must be positive. |
| 46 virtual void DestroyImage(int32_t id) = 0; | 46 virtual void DestroyImage(int32_t id) = 0; |
| 47 | 47 |
| 48 // Create a gpu memory buffer backed image with the given dimensions and | 48 // Create a gpu memory buffer backed image with the given dimensions and |
| 49 // format for |usage|. Returns its ID or -1 on error. | 49 // format for |usage|. Returns its ID or -1 on error. |
| 50 virtual int32_t CreateGpuMemoryBufferImage(size_t width, | 50 virtual int32_t CreateGpuMemoryBufferImage(size_t width, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // may not be supported with all implementations. | 85 // may not be supported with all implementations. |
| 86 virtual void SetLock(base::Lock*) = 0; | 86 virtual void SetLock(base::Lock*) = 0; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 89 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace gpu | 92 } // namespace gpu |
| 93 | 93 |
| 94 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 94 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |