Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: chrome/renderer/command_buffer_proxy.h

Issue 555020: Redesigned CommandBuffer and NPDevice3D interfaces (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/plugin/command_buffer_stub.cc ('k') | chrome/renderer/command_buffer_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ 5 #ifndef CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_
6 #define CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ 6 #define CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <map> 10 #include <map>
(...skipping 17 matching lines...) Expand all
28 PluginChannelHost* channel, 28 PluginChannelHost* channel,
29 int route_id); 29 int route_id);
30 virtual ~CommandBufferProxy(); 30 virtual ~CommandBufferProxy();
31 31
32 // IPC::Message::Sender implementation: 32 // IPC::Message::Sender implementation:
33 virtual bool Send(IPC::Message* msg); 33 virtual bool Send(IPC::Message* msg);
34 34
35 // CommandBuffer implementation: 35 // CommandBuffer implementation:
36 virtual bool Initialize(int32 size); 36 virtual bool Initialize(int32 size);
37 virtual gpu::Buffer GetRingBuffer(); 37 virtual gpu::Buffer GetRingBuffer();
38 virtual int32 GetSize(); 38 virtual State GetState();
39 virtual int32 SyncOffsets(int32 put_offset); 39 virtual State Flush(int32 put_offset);
40 virtual int32 GetGetOffset();
41 virtual void SetGetOffset(int32 get_offset); 40 virtual void SetGetOffset(int32 get_offset);
42 virtual int32 GetPutOffset();
43 virtual int32 CreateTransferBuffer(size_t size); 41 virtual int32 CreateTransferBuffer(size_t size);
44 virtual void DestroyTransferBuffer(int32 id); 42 virtual void DestroyTransferBuffer(int32 id);
45 virtual gpu::Buffer GetTransferBuffer(int32 handle); 43 virtual gpu::Buffer GetTransferBuffer(int32 handle);
46 virtual int32 GetToken();
47 virtual void SetToken(int32 token); 44 virtual void SetToken(int32 token);
48 virtual int32 ResetParseError(); 45 virtual void SetParseError(gpu::parse_error::ParseError parse_error);
49 virtual void SetParseError(int32 parse_error);
50 virtual bool GetErrorStatus();
51 virtual void RaiseErrorStatus();
52 46
53 private: 47 private:
54 // As with the service, the client takes ownership of the ring buffer. 48 // As with the service, the client takes ownership of the ring buffer.
55 int32 size_; 49 int32 size_;
56 scoped_ptr<base::SharedMemory> ring_buffer_; 50 scoped_ptr<base::SharedMemory> ring_buffer_;
57 51
58 // Local cache of id to transfer buffer mapping. 52 // Local cache of id to transfer buffer mapping.
59 typedef std::map<int32, gpu::Buffer> TransferBufferMap; 53 typedef std::map<int32, gpu::Buffer> TransferBufferMap;
60 TransferBufferMap transfer_buffers_; 54 TransferBufferMap transfer_buffers_;
61 55
62 scoped_refptr<PluginChannelHost> channel_; 56 scoped_refptr<PluginChannelHost> channel_;
63 int route_id_; 57 int route_id_;
64 58
65 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); 59 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy);
66 }; 60 };
67 61
68 #endif // ENABLE_GPU 62 #endif // ENABLE_GPU
69 63
70 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ 64 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/plugin/command_buffer_stub.cc ('k') | chrome/renderer/command_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698