OLD | NEW |
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_PPB_SURFACE_3D_PROXY_H_ | 5 #ifndef PPAPI_PPB_SURFACE_3D_PROXY_H_ |
6 #define PPAPI_PPB_SURFACE_3D_PROXY_H_ | 6 #define PPAPI_PPB_SURFACE_3D_PROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ppapi/c/dev/pp_graphics_3d_dev.h" | 10 #include "ppapi/c/dev/pp_graphics_3d_dev.h" |
11 #include "ppapi/c/pp_completion_callback.h" | 11 #include "ppapi/c/pp_completion_callback.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/cpp/completion_callback.h" | 13 #include "ppapi/cpp/completion_callback.h" |
14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
15 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" | 15 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" |
16 #include "ppapi/shared_impl/resource.h" | 16 #include "ppapi/shared_impl/resource.h" |
17 #include "ppapi/thunk/ppb_surface_3d_api.h" | 17 #include "ppapi/thunk/ppb_surface_3d_api.h" |
18 | 18 |
19 struct PPB_Surface3D_Dev; | 19 struct PPB_Surface3D_Dev; |
20 | 20 |
21 namespace pp { | 21 namespace ppapi { |
22 namespace proxy { | 22 namespace proxy { |
23 | 23 |
24 class Context3D; | 24 class Context3D; |
25 | 25 |
26 class Surface3D : public ppapi::Resource, | 26 class Surface3D : public ppapi::Resource, |
27 public ppapi::thunk::PPB_Surface3D_API { | 27 public ppapi::thunk::PPB_Surface3D_API { |
28 public: | 28 public: |
29 explicit Surface3D(const ppapi::HostResource& host_resource); | 29 explicit Surface3D(const ppapi::HostResource& host_resource); |
30 virtual ~Surface3D(); | 30 virtual ~Surface3D(); |
31 | 31 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 const std::vector<int32_t>& attribs, | 82 const std::vector<int32_t>& attribs, |
83 ppapi::HostResource* result); | 83 ppapi::HostResource* result); |
84 void OnMsgSwapBuffers(const ppapi::HostResource& surface); | 84 void OnMsgSwapBuffers(const ppapi::HostResource& surface); |
85 // Renderer->plugin message handlers. | 85 // Renderer->plugin message handlers. |
86 void OnMsgSwapBuffersACK(const ppapi::HostResource& surface, | 86 void OnMsgSwapBuffersACK(const ppapi::HostResource& surface, |
87 int32_t pp_error); | 87 int32_t pp_error); |
88 | 88 |
89 void SendSwapBuffersACKToPlugin(int32_t result, | 89 void SendSwapBuffersACKToPlugin(int32_t result, |
90 const ppapi::HostResource& surface_3d); | 90 const ppapi::HostResource& surface_3d); |
91 | 91 |
92 CompletionCallbackFactory<PPB_Surface3D_Proxy, | 92 pp::CompletionCallbackFactory<PPB_Surface3D_Proxy, |
93 ProxyNonThreadSafeRefCount> callback_factory_; | 93 ProxyNonThreadSafeRefCount> callback_factory_; |
94 }; | 94 }; |
95 | 95 |
96 } // namespace proxy | 96 } // namespace proxy |
97 } // namespace pp | 97 } // namespace ppapi |
98 | 98 |
99 #endif // PPAPI_PPB_SURFACE_3D_PROXY_H_ | 99 #endif // PPAPI_PPB_SURFACE_3D_PROXY_H_ |
OLD | NEW |