OLD | NEW |
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 15 matching lines...) Expand all Loading... |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 | 32 |
33 #include <algorithm> | 33 #include <algorithm> |
34 #include "command_buffer/common/cross/logging.h" | 34 #include "command_buffer/common/cross/logging.h" |
35 #include "command_buffer/common/cross/rpc_imc.h" | 35 #include "command_buffer/common/cross/rpc_imc.h" |
36 #include "third_party/native_client/googleclient/native_client/src/shared/imc/na
cl_htp.h" | 36 #include "native_client/src/shared/imc/nacl_htp.h" |
37 | 37 |
38 namespace o3d { | 38 namespace o3d { |
39 namespace command_buffer { | 39 namespace command_buffer { |
40 | 40 |
41 int NaclSendData(nacl::HtpHandle channel, | 41 int NaclSendData(nacl::HtpHandle channel, |
42 const void *data, | 42 const void *data, |
43 size_t size, | 43 size_t size, |
44 int flags) { | 44 int flags) { |
45 nacl::HtpHeader msg; | 45 nacl::HtpHeader msg; |
46 nacl::IOVec vec; | 46 nacl::IOVec vec; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 return address == nacl::kMapFailed ? NULL : address; | 222 return address == nacl::kMapFailed ? NULL : address; |
223 } | 223 } |
224 | 224 |
225 void UnmapShm(void *address, size_t size) { | 225 void UnmapShm(void *address, size_t size) { |
226 size = (size + nacl::kMapPageSize - 1) & ~(nacl::kMapPageSize - 1); | 226 size = (size + nacl::kMapPageSize - 1) & ~(nacl::kMapPageSize - 1); |
227 nacl::Unmap(address, size); | 227 nacl::Unmap(address, size); |
228 } | 228 } |
229 | 229 |
230 } // namespace command_buffer | 230 } // namespace command_buffer |
231 } // namespace o3d | 231 } // namespace o3d |
OLD | NEW |