Clean up test expectations from 54340:54465 WebKit Roll.
[chromium-blink-merge.git] / gpu / pgl / command_buffer_pepper.h
blob3719e393ff5b05d2869e1fae552e81ff315bb7c0
1 // Copyright (c) 2010 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_PGL_COMMAND_BUFFER_PEPPER_H
6 #define GPU_PGL_COMMAND_BUFFER_PEPPER_H
8 #include "gpu/command_buffer/common/command_buffer.h"
9 #include "third_party/npapi/bindings/npapi.h"
10 #include "third_party/npapi/bindings/npruntime.h"
11 #include "third_party/npapi/bindings/npapi_extensions.h"
12 #ifdef __native_client__
13 #include "native_client/src/third_party/npapi/files/include/npupp.h"
14 #else
15 #include "webkit/glue/plugins/nphostapi.h"
16 #endif // __native_client__
18 // A CommandBuffer proxy implementation that uses the Pepper API to access
19 // the command buffer.
21 class CommandBufferPepper : public gpu::CommandBuffer {
22 public:
23 CommandBufferPepper(NPP npp,
24 NPDevice* device,
25 NPDeviceContext3D* device_context);
26 virtual ~CommandBufferPepper();
28 // CommandBuffer implementation.
29 virtual bool Initialize(int32 size);
30 virtual gpu::Buffer GetRingBuffer();
31 virtual State GetState();
32 virtual State Flush(int32 put_offset);
33 virtual void SetGetOffset(int32 get_offset);
34 virtual int32 CreateTransferBuffer(size_t size);
35 virtual void DestroyTransferBuffer(int32 id);
36 virtual gpu::Buffer GetTransferBuffer(int32 handle);
37 virtual void SetToken(int32 token);
38 virtual void SetParseError(gpu::error::Error error);
40 private:
41 CommandBuffer::State ConvertState();
43 NPP npp_;
44 NPDevice* device_;
45 NPDeviceContext3D* context_;
48 #endif // GPU_PGL_COMMAND_BUFFER_PEPPER_H