| OLD | NEW |
| 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 #include "ppapi/proxy/ppapi_command_buffer_proxy.h" | 5 #include "ppapi/proxy/ppapi_command_buffer_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/proxy/ppapi_messages.h" | 7 #include "ppapi/proxy/ppapi_messages.h" |
| 8 #include "ppapi/proxy/proxy_channel.h" | 8 #include "ppapi/proxy/proxy_channel.h" |
| 9 #include "ppapi/shared_impl/api_id.h" | 9 #include "ppapi/shared_impl/api_id.h" |
| 10 #include "ppapi/shared_impl/host_resource.h" | 10 #include "ppapi/shared_impl/host_resource.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 int PpapiCommandBufferProxy::GetRouteID() const { | 39 int PpapiCommandBufferProxy::GetRouteID() const { |
| 40 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
| 41 return 0; | 41 return 0; |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool PpapiCommandBufferProxy::Echo(const base::Closure& callback) { | 44 bool PpapiCommandBufferProxy::Echo(const base::Closure& callback) { |
| 45 return false; | 45 return false; |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool PpapiCommandBufferProxy::SetSurfaceVisible(bool visible) { | |
| 49 NOTIMPLEMENTED(); | |
| 50 return true; | |
| 51 } | |
| 52 | |
| 53 bool PpapiCommandBufferProxy::DiscardBackbuffer() { | |
| 54 NOTIMPLEMENTED(); | |
| 55 return true; | |
| 56 } | |
| 57 | |
| 58 bool PpapiCommandBufferProxy::EnsureBackbuffer() { | |
| 59 NOTIMPLEMENTED(); | |
| 60 return true; | |
| 61 } | |
| 62 | |
| 63 uint32 PpapiCommandBufferProxy::InsertSyncPoint() { | |
| 64 NOTIMPLEMENTED(); | |
| 65 return 0; | |
| 66 } | |
| 67 | |
| 68 void PpapiCommandBufferProxy::WaitSyncPoint(uint32 sync_point) { | |
| 69 NOTIMPLEMENTED(); | |
| 70 } | |
| 71 | |
| 72 bool PpapiCommandBufferProxy::SignalSyncPoint(uint32 sync_point, | |
| 73 const base::Closure& callback) { | |
| 74 NOTIMPLEMENTED(); | |
| 75 return false; | |
| 76 } | |
| 77 | |
| 78 void PpapiCommandBufferProxy::SetMemoryAllocationChangedCallback( | |
| 79 const base::Callback<void( | |
| 80 const content::GpuMemoryAllocationForRenderer&)>& callback) { | |
| 81 NOTIMPLEMENTED(); | |
| 82 } | |
| 83 | |
| 84 bool PpapiCommandBufferProxy::SetParent( | 48 bool PpapiCommandBufferProxy::SetParent( |
| 85 CommandBufferProxy* parent_command_buffer, | 49 CommandBufferProxy* parent_command_buffer, |
| 86 uint32 parent_texture_id) { | 50 uint32 parent_texture_id) { |
| 87 // TODO(fsamuel): Need a proper implementation of this to support offscreen | 51 // TODO(fsamuel): Need a proper implementation of this to support offscreen |
| 88 // contexts in the guest renderer (WebGL, canvas, etc). | 52 // contexts in the guest renderer (WebGL, canvas, etc). |
| 89 NOTIMPLEMENTED(); | 53 NOTIMPLEMENTED(); |
| 90 return false; | 54 return false; |
| 91 } | 55 } |
| 92 | 56 |
| 93 void PpapiCommandBufferProxy::SetChannelErrorCallback( | 57 void PpapiCommandBufferProxy::SetChannelErrorCallback( |
| 94 const base::Closure& callback) { | 58 const base::Closure& callback) { |
| 95 channel_error_callback_ = callback; | 59 channel_error_callback_ = callback; |
| 96 } | 60 } |
| 97 | 61 |
| 98 void PpapiCommandBufferProxy::SetNotifyRepaintTask( | |
| 99 const base::Closure& callback) { | |
| 100 NOTIMPLEMENTED(); | |
| 101 } | |
| 102 | |
| 103 void PpapiCommandBufferProxy::SetOnConsoleMessageCallback( | |
| 104 const GpuConsoleMessageCallback& callback) { | |
| 105 NOTIMPLEMENTED(); | |
| 106 } | |
| 107 | |
| 108 bool PpapiCommandBufferProxy::Initialize() { | 62 bool PpapiCommandBufferProxy::Initialize() { |
| 109 return Send(new PpapiHostMsg_PPBGraphics3D_InitCommandBuffer( | 63 return Send(new PpapiHostMsg_PPBGraphics3D_InitCommandBuffer( |
| 110 ppapi::API_ID_PPB_GRAPHICS_3D, resource_)); | 64 ppapi::API_ID_PPB_GRAPHICS_3D, resource_)); |
| 111 } | 65 } |
| 112 | 66 |
| 113 gpu::CommandBuffer::State PpapiCommandBufferProxy::GetState() { | 67 gpu::CommandBuffer::State PpapiCommandBufferProxy::GetState() { |
| 114 // Send will flag state with lost context if IPC fails. | 68 // Send will flag state with lost context if IPC fails. |
| 115 if (last_state_.error == gpu::error::kNoError) { | 69 if (last_state_.error == gpu::error::kNoError) { |
| 116 gpu::CommandBuffer::State state; | 70 gpu::CommandBuffer::State state; |
| 117 bool success = false; | 71 bool success = false; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 last_state_ = state; | 243 last_state_ = state; |
| 290 } | 244 } |
| 291 } else { | 245 } else { |
| 292 last_state_.error = gpu::error::kLostContext; | 246 last_state_.error = gpu::error::kLostContext; |
| 293 ++last_state_.generation; | 247 ++last_state_.generation; |
| 294 } | 248 } |
| 295 } | 249 } |
| 296 | 250 |
| 297 } // namespace proxy | 251 } // namespace proxy |
| 298 } // namespace ppapi | 252 } // namespace ppapi |
| OLD | NEW |