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 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 5 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/proxy/enter_proxy.h" | 9 #include "ppapi/proxy/enter_proxy.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 state.put_offset = s.put_offset; | 282 state.put_offset = s.put_offset; |
283 state.token = s.token; | 283 state.token = s.token; |
284 state.error = static_cast<gpu::error::Error>(s.error); | 284 state.error = static_cast<gpu::error::Error>(s.error); |
285 state.generation = s.generation; | 285 state.generation = s.generation; |
286 return state; | 286 return state; |
287 } | 287 } |
288 | 288 |
289 } // namespace | 289 } // namespace |
290 | 290 |
291 Graphics3D::Graphics3D(const HostResource& resource) | 291 Graphics3D::Graphics3D(const HostResource& resource) |
292 : Resource(resource) { | 292 : PPB_Graphics3D_Shared(resource) { |
293 } | 293 } |
294 | 294 |
295 Graphics3D::~Graphics3D() { | 295 Graphics3D::~Graphics3D() { |
296 DestroyGLES2Impl(); | 296 DestroyGLES2Impl(); |
297 } | 297 } |
298 | 298 |
299 bool Graphics3D::Init() { | 299 bool Graphics3D::Init() { |
300 PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this); | 300 PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this); |
301 if (!dispatcher) | 301 if (!dispatcher) |
302 return false; | 302 return false; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( | 554 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( |
555 int32_t result, | 555 int32_t result, |
556 const HostResource& context) { | 556 const HostResource& context) { |
557 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( | 557 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( |
558 API_ID_PPB_GRAPHICS_3D, context, result)); | 558 API_ID_PPB_GRAPHICS_3D, context, result)); |
559 } | 559 } |
560 | 560 |
561 } // namespace proxy | 561 } // namespace proxy |
562 } // namespace ppapi | 562 } // namespace ppapi |
563 | 563 |
OLD | NEW |