Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ | |
| 6 #define GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ | |
| 7 | |
| 8 #include "gpu/gpu_export.h" | |
| 9 | |
| 10 namespace gfx { | |
| 11 class GpuMemoryBuffer; | |
| 12 } | |
| 13 | |
| 14 namespace gpu { | |
| 15 | |
| 16 // Common interface for GpuControl implementations. | |
| 17 class GPU_EXPORT GpuControl { | |
|
kaanb
2013/08/13 00:51:09
How about GpuMemoryControl?
reveman
2013/08/13 01:48:26
Based on previous discussion this interface might
| |
| 18 public: | |
| 19 GpuControl() {} | |
| 20 virtual ~GpuControl() {} | |
| 21 | |
| 22 // Create a gpu memory buffer of the given dimensions and format. Returns | |
| 23 // its ID or -1 on error. | |
| 24 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( | |
| 25 size_t width, | |
| 26 size_t height, | |
| 27 unsigned internalformat, | |
| 28 int32* id) = 0; | |
| 29 | |
| 30 // Destroy a gpu memory buffer. The ID must be positive. | |
| 31 virtual void DestroyGpuMemoryBuffer(int32 id) = 0; | |
| 32 | |
| 33 private: | |
| 34 DISALLOW_COPY_AND_ASSIGN(GpuControl); | |
| 35 }; | |
| 36 | |
| 37 } // namespace gpu | |
| 38 | |
| 39 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_ | |
| OLD | NEW |