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

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

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 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
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_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/shared_memory.h" 10 #include "base/shared_memory.h"
11 #include "gpu/command_buffer/common/command_buffer.h" 11 #include "gpu/command_buffer/common/command_buffer.h"
12 #include "ppapi/c/dev/pp_graphics_3d_dev.h" 12 #include "ppapi/c/dev/pp_graphics_3d_dev.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/cpp/completion_callback.h" 14 #include "ppapi/cpp/completion_callback.h"
15 #include "ppapi/proxy/interface_proxy.h" 15 #include "ppapi/proxy/interface_proxy.h"
16 #include "ppapi/proxy/plugin_resource.h"
17 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" 16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h"
18 #include "ppapi/shared_impl/graphics_3d_impl.h" 17 #include "ppapi/shared_impl/graphics_3d_impl.h"
18 #include "ppapi/shared_impl/resource.h"
19 19
20 namespace ppapi { 20 namespace ppapi {
21 class HostResource; 21 class HostResource;
22 } 22 }
23 23
24 namespace pp { 24 namespace pp {
25 namespace proxy { 25 namespace proxy {
26 26
27 class Graphics3D : public PluginResource, 27 class Graphics3D : public ppapi::Resource,
28 public ppapi::Graphics3DImpl { 28 public ppapi::Graphics3DImpl {
29 public: 29 public:
30 explicit Graphics3D(const ppapi::HostResource& resource); 30 explicit Graphics3D(const ppapi::HostResource& resource);
31 virtual ~Graphics3D(); 31 virtual ~Graphics3D();
32 32
33 bool Init(); 33 bool Init();
34 34
35 // PluginResource overrides. 35 // Resource overrides.
36 virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE { 36 virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE {
37 return this; 37 return this;
38 } 38 }
39 39
40 // Graphics3DTrusted API. These are not implemented in the proxy. 40 // Graphics3DTrusted API. These are not implemented in the proxy.
41 virtual PP_Bool InitCommandBuffer(int32_t size) OVERRIDE; 41 virtual PP_Bool InitCommandBuffer(int32_t size) OVERRIDE;
42 virtual PP_Bool GetRingBuffer(int* shm_handle, uint32_t* shm_size) OVERRIDE; 42 virtual PP_Bool GetRingBuffer(int* shm_handle, uint32_t* shm_size) OVERRIDE;
43 virtual PP_Graphics3DTrustedState GetState() OVERRIDE; 43 virtual PP_Graphics3DTrustedState GetState() OVERRIDE;
44 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; 44 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE;
45 virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) OVERRIDE; 45 virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) OVERRIDE;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ProxyNonThreadSafeRefCount> callback_factory_; 117 ProxyNonThreadSafeRefCount> callback_factory_;
118 118
119 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 119 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
120 }; 120 };
121 121
122 } // namespace proxy 122 } // namespace proxy
123 } // namespace pp 123 } // namespace pp
124 124
125 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 125 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
126 126
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698