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

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

Issue 547733002: [Pepper GL] Use shared state to fix a memory leak in MapSub GL extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remve base/memory/shared_memory.h from DEPS Created 6 years, 3 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
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_graphics_3d_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GRAPHICS_3D_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 14 matching lines...) Expand all
25 namespace proxy { 25 namespace proxy {
26 26
27 class SerializedHandle; 27 class SerializedHandle;
28 class PpapiCommandBufferProxy; 28 class PpapiCommandBufferProxy;
29 29
30 class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared { 30 class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared {
31 public: 31 public:
32 explicit Graphics3D(const HostResource& resource); 32 explicit Graphics3D(const HostResource& resource);
33 virtual ~Graphics3D(); 33 virtual ~Graphics3D();
34 34
35 bool Init(gpu::gles2::GLES2Implementation* share_gles2); 35 bool Init(gpu::gles2::GLES2Implementation* share_gles2,
36 const SerializedHandle& shared_state);
36 37
37 // Graphics3DTrusted API. These are not implemented in the proxy. 38 // Graphics3DTrusted API. These are not implemented in the proxy.
38 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE; 39 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE;
39 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; 40 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE;
40 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, 41 virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size,
41 int32* id) OVERRIDE; 42 int32* id) OVERRIDE;
42 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; 43 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE;
43 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, 44 virtual gpu::CommandBuffer::State WaitForTokenInRange(int32_t start,
44 int32_t end) OVERRIDE; 45 int32_t end) OVERRIDE;
45 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, 46 virtual gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start,
(...skipping 26 matching lines...) Expand all
72 73
73 // InterfaceProxy implementation. 74 // InterfaceProxy implementation.
74 virtual bool OnMessageReceived(const IPC::Message& msg); 75 virtual bool OnMessageReceived(const IPC::Message& msg);
75 76
76 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; 77 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D;
77 78
78 private: 79 private:
79 void OnMsgCreate(PP_Instance instance, 80 void OnMsgCreate(PP_Instance instance,
80 HostResource share_context, 81 HostResource share_context,
81 const std::vector<int32_t>& attribs, 82 const std::vector<int32_t>& attribs,
82 HostResource* result); 83 HostResource* result,
84 SerializedHandle* handle);
83 void OnMsgSetGetBuffer(const HostResource& context, 85 void OnMsgSetGetBuffer(const HostResource& context,
84 int32 id); 86 int32 id);
85 void OnMsgWaitForTokenInRange(const HostResource& context, 87 void OnMsgWaitForTokenInRange(const HostResource& context,
86 int32 start, 88 int32 start,
87 int32 end, 89 int32 end,
88 gpu::CommandBuffer::State* state, 90 gpu::CommandBuffer::State* state,
89 bool* success); 91 bool* success);
90 void OnMsgWaitForGetOffsetInRange(const HostResource& context, 92 void OnMsgWaitForGetOffsetInRange(const HostResource& context,
91 int32 start, 93 int32 start,
92 int32 end, 94 int32 end,
(...skipping 22 matching lines...) Expand all
115 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; 117 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_;
116 118
117 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 119 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
118 }; 120 };
119 121
120 } // namespace proxy 122 } // namespace proxy
121 } // namespace ppapi 123 } // namespace ppapi
122 124
123 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 125 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
124 126
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698