cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / gpu / command_buffer / common / gpu_control.h
blob5534ca78967bceec083a7fb955ffc84d5a59c438
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"
10 namespace gfx {
11 class GpuMemoryBuffer;
14 namespace gpu {
16 // Common interface for GpuControl implementations.
17 class GPU_EXPORT GpuControl {
18 public:
19 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(
25 size_t width,
26 size_t height,
27 unsigned internalformat,
28 int32* id) = 0;
30 // Destroy a gpu memory buffer. The ID must be positive.
31 virtual void DestroyGpuMemoryBuffer(int32 id) = 0;
33 private:
34 DISALLOW_COPY_AND_ASSIGN(GpuControl);
37 } // namespace gpu
39 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_CONTROL_H_