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

Side by Side Diff: o3d/command_buffer/service/cross/cmd_buffer_engine.h

Issue 234001: GPUProcessor uses O3D command buffer service to render to a window.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « no previous file | o3d/command_buffer/service/cross/gapi_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 28 matching lines...) Expand all
39 #include <vector> 39 #include <vector>
40 #include "base/scoped_ptr.h" 40 #include "base/scoped_ptr.h"
41 #include "command_buffer/common/cross/buffer_sync_api.h" 41 #include "command_buffer/common/cross/buffer_sync_api.h"
42 #include "command_buffer/service/cross/cmd_parser.h" 42 #include "command_buffer/service/cross/cmd_parser.h"
43 43
44 namespace o3d { 44 namespace o3d {
45 namespace command_buffer { 45 namespace command_buffer {
46 46
47 class BufferRPCImpl; 47 class BufferRPCImpl;
48 48
49 class CommandBufferEngine : public BufferSyncInterface { 49 class CommandBufferUpcallInterface {
50 public:
51 CommandBufferUpcallInterface() {
52 }
53
54 virtual ~CommandBufferUpcallInterface() {
55 }
56
57 // Gets the base address of a registered shared memory buffer.
58 // Parameters:
59 // shm_id: the identifier for the shared memory buffer.
60 virtual void *GetSharedMemoryAddress(unsigned int shm_id) = 0;
61
62 // Gets the size of a registered shared memory buffer.
63 // Parameters:
64 // shm_id: the identifier for the shared memory buffer.
65 virtual size_t GetSharedMemorySize(unsigned int shm_id) = 0;
66
67 // Sets the token value.
68 virtual void set_token(unsigned int token) = 0;
69
70 private:
71 DISALLOW_COPY_AND_ASSIGN(CommandBufferUpcallInterface);
72 };
73
74 class CommandBufferEngine : public BufferSyncInterface,
75 public CommandBufferUpcallInterface {
50 public: 76 public:
51 explicit CommandBufferEngine(AsyncAPIInterface *handler); 77 explicit CommandBufferEngine(AsyncAPIInterface *handler);
52 virtual ~CommandBufferEngine(); 78 virtual ~CommandBufferEngine();
53 79
54 // Initializes the connection with the client. 80 // Initializes the connection with the client.
55 virtual void InitConnection(); 81 virtual void InitConnection();
56 82
57 // Closes the connection with the client. 83 // Closes the connection with the client.
58 virtual void CloseConnection(); 84 virtual void CloseConnection();
59 85
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 void *address; 231 void *address;
206 size_t size; 232 size_t size;
207 }; 233 };
208 std::vector<MemoryMapping> shared_memory_buffers_; 234 std::vector<MemoryMapping> shared_memory_buffers_;
209 }; 235 };
210 236
211 } // namespace command_buffer 237 } // namespace command_buffer
212 } // namespace o3d 238 } // namespace o3d
213 239
214 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_CMD_BUFFER_ENGINE_H_ 240 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_CMD_BUFFER_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | o3d/command_buffer/service/cross/gapi_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698