gpu: Separate GpuControlService from GpuControl
[chromium-blink-merge.git] / gpu / command_buffer / service / gpu_control_service.h
blob9a64946384f1d70c9fda3b2652be72ebcd11bb12
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_SERVICE_GPU_CONTROL_SERVICE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_
8 #include "base/callback.h"
9 #include "gpu/command_buffer/common/capabilities.h"
10 #include "gpu/gpu_export.h"
11 #include "ui/gfx/gpu_memory_buffer.h"
13 namespace gpu {
14 class GpuMemoryBufferManagerInterface;
16 namespace gles2 {
17 class QueryManager;
20 class GPU_EXPORT GpuControlService {
21 public:
22 GpuControlService(GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager,
23 gles2::QueryManager* query_manager);
24 virtual ~GpuControlService();
26 void SignalQuery(uint32 query, const base::Closure& callback);
28 void RegisterGpuMemoryBuffer(int32 id,
29 gfx::GpuMemoryBufferHandle buffer,
30 size_t width,
31 size_t height,
32 unsigned internalformat);
33 void UnregisterGpuMemoryBuffer(int32 id);
35 private:
36 GpuMemoryBufferManagerInterface* gpu_memory_buffer_manager_;
37 gles2::QueryManager* query_manager_;
39 DISALLOW_COPY_AND_ASSIGN(GpuControlService);
42 } // namespace gpu
44 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_CONTROL_SERVICE_H_