OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef GPU_PGL_COMMAND_BUFFER_PEPPER_H |
| 6 #define GPU_PGL_COMMAND_BUFFER_PEPPER_H |
| 7 |
| 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 "webkit/glue/plugins/nphostapi.h" |
| 12 |
| 13 // A CommandBuffer proxy implementation that uses the Pepper API to access |
| 14 // the command buffer. |
| 15 |
| 16 class CommandBufferPepper : public gpu::CommandBuffer { |
| 17 public: |
| 18 CommandBufferPepper(NPP npp, |
| 19 NPDevice* device, |
| 20 NPDeviceContext3D* device_context); |
| 21 virtual ~CommandBufferPepper(); |
| 22 |
| 23 // CommandBuffer implementation. |
| 24 virtual bool Initialize(int32 size); |
| 25 virtual gpu::Buffer GetRingBuffer(); |
| 26 virtual int32 GetSize(); |
| 27 virtual int32 SyncOffsets(int32 put_offset); |
| 28 virtual int32 GetGetOffset(); |
| 29 virtual void SetGetOffset(int32 get_offset); |
| 30 virtual int32 GetPutOffset(); |
| 31 virtual int32 CreateTransferBuffer(size_t size); |
| 32 virtual void DestroyTransferBuffer(int32 id); |
| 33 virtual gpu::Buffer GetTransferBuffer(int32 handle); |
| 34 virtual int32 GetToken(); |
| 35 virtual void SetToken(int32 token); |
| 36 virtual int32 ResetParseError(); |
| 37 virtual void SetParseError(int32 parse_error); |
| 38 virtual bool GetErrorStatus(); |
| 39 virtual void RaiseErrorStatus(); |
| 40 |
| 41 private: |
| 42 NPP npp_; |
| 43 NPDevice* device_; |
| 44 NPDeviceContext3D* context_; |
| 45 }; |
| 46 |
| 47 #endif // GPU_PGL_COMMAND_BUFFER_PEPPER_H |
| 48 |
| 49 |
OLD | NEW |