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

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

Issue 7655002: Convert the pp::proxy namespace to the ppapi::proxy namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_CONTEXT_3D_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_
6 #define PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ 6 #define PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 12 matching lines...) Expand all
23 namespace gpu { 23 namespace gpu {
24 class CommandBuffer; 24 class CommandBuffer;
25 25
26 namespace gles2 { 26 namespace gles2 {
27 class GLES2CmdHelper; 27 class GLES2CmdHelper;
28 class GLES2Implementation; 28 class GLES2Implementation;
29 } // namespace gles2 29 } // namespace gles2
30 30
31 } // namespace gpu 31 } // namespace gpu
32 32
33 namespace pp { 33 namespace ppapi {
34 namespace proxy { 34 namespace proxy {
35 35
36 class Surface3D; 36 class Surface3D;
37 37
38 class Context3D : public ppapi::Resource, 38 class Context3D : public Resource,
39 public ppapi::thunk::PPB_Context3D_API { 39 public thunk::PPB_Context3D_API {
40 public: 40 public:
41 explicit Context3D(const ppapi::HostResource& resource); 41 explicit Context3D(const HostResource& resource);
42 virtual ~Context3D(); 42 virtual ~Context3D();
43 43
44 // Resource overrides. 44 // Resource overrides.
45 virtual ::ppapi::thunk::PPB_Context3D_API* AsPPB_Context3D_API() OVERRIDE; 45 virtual thunk::PPB_Context3D_API* AsPPB_Context3D_API() OVERRIDE;
46 46
47 gpu::gles2::GLES2Implementation* gles2_impl() const { 47 gpu::gles2::GLES2Implementation* gles2_impl() const {
48 return gles2_impl_.get(); 48 return gles2_impl_.get();
49 } 49 }
50 50
51 // PPB_Context3D_API implementation. 51 // PPB_Context3D_API implementation.
52 virtual int32_t GetAttrib(int32_t attribute, int32_t* value) OVERRIDE; 52 virtual int32_t GetAttrib(int32_t attribute, int32_t* value) OVERRIDE;
53 virtual int32_t BindSurfaces(PP_Resource draw, PP_Resource read) OVERRIDE; 53 virtual int32_t BindSurfaces(PP_Resource draw, PP_Resource read) OVERRIDE;
54 virtual int32_t GetBoundSurfaces(PP_Resource* draw, 54 virtual int32_t GetBoundSurfaces(PP_Resource* draw,
55 PP_Resource* read) OVERRIDE; 55 PP_Resource* read) OVERRIDE;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 PP_Resource share_context, 106 PP_Resource share_context,
107 const int32_t* attrib_list); 107 const int32_t* attrib_list);
108 108
109 // InterfaceProxy implementation. 109 // InterfaceProxy implementation.
110 virtual bool OnMessageReceived(const IPC::Message& msg); 110 virtual bool OnMessageReceived(const IPC::Message& msg);
111 111
112 private: 112 private:
113 void OnMsgCreate(PP_Instance instance, 113 void OnMsgCreate(PP_Instance instance,
114 PP_Config3D_Dev config, 114 PP_Config3D_Dev config,
115 const std::vector<int32_t>& attribs, 115 const std::vector<int32_t>& attribs,
116 ppapi::HostResource* result); 116 HostResource* result);
117 void OnMsgBindSurfaces(const ppapi::HostResource& context, 117 void OnMsgBindSurfaces(const HostResource& context,
118 const ppapi::HostResource& draw, 118 const HostResource& draw,
119 const ppapi::HostResource& read, 119 const HostResource& read,
120 int32_t* result); 120 int32_t* result);
121 void OnMsgInitialize(const ppapi::HostResource& context, 121 void OnMsgInitialize(const HostResource& context,
122 int32 size, 122 int32 size,
123 base::SharedMemoryHandle* ring_buffer); 123 base::SharedMemoryHandle* ring_buffer);
124 void OnMsgGetState(const ppapi::HostResource& context, 124 void OnMsgGetState(const HostResource& context,
125 gpu::CommandBuffer::State* state); 125 gpu::CommandBuffer::State* state);
126 void OnMsgFlush(const ppapi::HostResource& context, 126 void OnMsgFlush(const HostResource& context,
127 int32 put_offset, 127 int32 put_offset,
128 int32 last_known_get, 128 int32 last_known_get,
129 gpu::CommandBuffer::State* state); 129 gpu::CommandBuffer::State* state);
130 void OnMsgAsyncFlush(const ppapi::HostResource& context, 130 void OnMsgAsyncFlush(const HostResource& context,
131 int32 put_offset); 131 int32 put_offset);
132 void OnMsgCreateTransferBuffer(const ppapi::HostResource& context, 132 void OnMsgCreateTransferBuffer(const HostResource& context,
133 int32 size, 133 int32 size,
134 int32* id); 134 int32* id);
135 void OnMsgDestroyTransferBuffer(const ppapi::HostResource& context, 135 void OnMsgDestroyTransferBuffer(const HostResource& context,
136 int32 id); 136 int32 id);
137 void OnMsgGetTransferBuffer(const ppapi::HostResource& context, 137 void OnMsgGetTransferBuffer(const HostResource& context,
138 int32 id, 138 int32 id,
139 base::SharedMemoryHandle* transfer_buffer, 139 base::SharedMemoryHandle* transfer_buffer,
140 uint32* size); 140 uint32* size);
141 }; 141 };
142 142
143 } // namespace proxy 143 } // namespace proxy
144 } // namespace pp 144 } // namespace ppapi
145 145
146 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ 146 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698