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
3 // found in the LICENSE file.
5 #ifndef GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_
6 #define GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_
8 #include "gpu/gpu_export.h"
11 class GpuMemoryBuffer
;
16 // Common interface for GpuControl implementations.
17 class GPU_EXPORT GpuControl
{
20 virtual ~GpuControl() {}
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(
27 unsigned internalformat
,
30 // Destroy a gpu memory buffer. The ID must be positive.
31 virtual void DestroyGpuMemoryBuffer(int32 id
) = 0;
34 DISALLOW_COPY_AND_ASSIGN(GpuControl
);
39 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_