Infobar material design refresh: bg color
[chromium-blink-merge.git] / gpu / command_buffer / service / cmd_buffer_engine.h
blob75e60691f51369933093b38173915cda3e7042c3
1 // Copyright (c) 2011 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 // This file defines the CommandBufferEngine class, providing the main loop for
6 // the service, exposing the RPC API, managing the command parser.
8 #ifndef GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_
9 #define GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_
11 #include "base/basictypes.h"
12 #include "gpu/command_buffer/common/buffer.h"
14 namespace gpu {
16 class CommandBufferEngine {
17 public:
18 CommandBufferEngine() {
21 virtual ~CommandBufferEngine() {
24 // Gets the base address and size of a registered shared memory buffer.
25 // Parameters:
26 // shm_id: the identifier for the shared memory buffer.
27 virtual scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) = 0;
29 // Sets the token value.
30 virtual void set_token(int32 token) = 0;
32 // Sets the shared memory buffer used for commands.
33 virtual bool SetGetBuffer(int32 transfer_buffer_id) = 0;
35 // Sets the "get" pointer. Return false if offset is out of range.
36 virtual bool SetGetOffset(int32 offset) = 0;
38 // Gets the "get" pointer.
39 virtual int32 GetGetOffset() = 0;
41 private:
42 DISALLOW_COPY_AND_ASSIGN(CommandBufferEngine);
45 } // namespace gpu
47 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_BUFFER_ENGINE_H_