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

Side by Side Diff: ppapi/proxy/ppb_buffer_proxy.h

Issue 10790063: PPAPI/NaCl: Make ImageData for NaCl just use shared memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make PPB_ImageData_API base non-exported Created 8 years, 4 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 | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PPAPI_PROXY_PPB_BUFFER_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_BUFFER_PROXY_H_
6 #define PPAPI_PROXY_PPB_BUFFER_PROXY_H_ 6 #define PPAPI_PROXY_PPB_BUFFER_PROXY_H_
7 7
8 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/proxy/interface_proxy.h" 10 #include "ppapi/proxy/interface_proxy.h"
(...skipping 18 matching lines...) Expand all
29 29
30 // PPB_Buffer_API implementation. 30 // PPB_Buffer_API implementation.
31 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; 31 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE;
32 virtual PP_Bool IsMapped() OVERRIDE; 32 virtual PP_Bool IsMapped() OVERRIDE;
33 virtual void* Map() OVERRIDE; 33 virtual void* Map() OVERRIDE;
34 virtual void Unmap() OVERRIDE; 34 virtual void Unmap() OVERRIDE;
35 35
36 private: 36 private:
37 base::SharedMemory shm_; 37 base::SharedMemory shm_;
38 uint32_t size_; 38 uint32_t size_;
39 void* mapped_data_;
40 int map_count_; 39 int map_count_;
41 40
42 DISALLOW_COPY_AND_ASSIGN(Buffer); 41 DISALLOW_COPY_AND_ASSIGN(Buffer);
43 }; 42 };
44 43
45 class PPB_Buffer_Proxy : public InterfaceProxy { 44 class PPB_Buffer_Proxy : public InterfaceProxy {
46 public: 45 public:
47 explicit PPB_Buffer_Proxy(Dispatcher* dispatcher); 46 explicit PPB_Buffer_Proxy(Dispatcher* dispatcher);
48 virtual ~PPB_Buffer_Proxy(); 47 virtual ~PPB_Buffer_Proxy();
49 48
(...skipping 13 matching lines...) Expand all
63 void OnMsgCreate(PP_Instance instance, 62 void OnMsgCreate(PP_Instance instance,
64 uint32_t size, 63 uint32_t size,
65 HostResource* result_resource, 64 HostResource* result_resource,
66 base::SharedMemoryHandle* result_shm_handle); 65 base::SharedMemoryHandle* result_shm_handle);
67 }; 66 };
68 67
69 } // namespace proxy 68 } // namespace proxy
70 } // namespace ppapi 69 } // namespace ppapi
71 70
72 #endif // PPAPI_PROXY_PPB_BUFFER_PROXY_H_ 71 #endif // PPAPI_PROXY_PPB_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698