| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void PpapiCommandBufferProxy::SetSurfaceVisible(bool visible) { | 188 void PpapiCommandBufferProxy::SetSurfaceVisible(bool visible) { |
| 189 NOTREACHED(); | 189 NOTREACHED(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 gpu::Capabilities PpapiCommandBufferProxy::GetCapabilities() { | 192 gpu::Capabilities PpapiCommandBufferProxy::GetCapabilities() { |
| 193 // TODO(boliu): Need to implement this to use cc in Pepper. Tracked in | 193 // TODO(boliu): Need to implement this to use cc in Pepper. Tracked in |
| 194 // crbug.com/325391. | 194 // crbug.com/325391. |
| 195 return gpu::Capabilities(); | 195 return gpu::Capabilities(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 gfx::GpuMemoryBuffer* PpapiCommandBufferProxy::CreateGpuMemoryBuffer( | 198 int32 PpapiCommandBufferProxy::CreateImage(ClientBuffer buffer, |
| 199 size_t width, |
| 200 size_t height, |
| 201 unsigned internalformat) { |
| 202 NOTREACHED(); |
| 203 return -1; |
| 204 } |
| 205 |
| 206 void PpapiCommandBufferProxy::DestroyImage(int32 id) { |
| 207 NOTREACHED(); |
| 208 } |
| 209 |
| 210 int32 PpapiCommandBufferProxy::CreateGpuMemoryBufferImage( |
| 199 size_t width, | 211 size_t width, |
| 200 size_t height, | 212 size_t height, |
| 201 unsigned internalformat, | 213 unsigned internalformat, |
| 202 unsigned usage, | 214 unsigned usage) { |
| 203 int32* id) { | |
| 204 NOTREACHED(); | 215 NOTREACHED(); |
| 205 return NULL; | 216 return -1; |
| 206 } | |
| 207 | |
| 208 void PpapiCommandBufferProxy::DestroyGpuMemoryBuffer(int32 id) { | |
| 209 NOTREACHED(); | |
| 210 } | 217 } |
| 211 | 218 |
| 212 bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { | 219 bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { |
| 213 DCHECK(last_state_.error == gpu::error::kNoError); | 220 DCHECK(last_state_.error == gpu::error::kNoError); |
| 214 | 221 |
| 215 if (channel_->Send(msg)) | 222 if (channel_->Send(msg)) |
| 216 return true; | 223 return true; |
| 217 | 224 |
| 218 last_state_.error = gpu::error::kLostContext; | 225 last_state_.error = gpu::error::kLostContext; |
| 219 return false; | 226 return false; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 239 shared_state()->Read(&last_state_); | 246 shared_state()->Read(&last_state_); |
| 240 } | 247 } |
| 241 | 248 |
| 242 gpu::CommandBufferSharedState* PpapiCommandBufferProxy::shared_state() const { | 249 gpu::CommandBufferSharedState* PpapiCommandBufferProxy::shared_state() const { |
| 243 return reinterpret_cast<gpu::CommandBufferSharedState*>( | 250 return reinterpret_cast<gpu::CommandBufferSharedState*>( |
| 244 shared_state_shm_->memory()); | 251 shared_state_shm_->memory()); |
| 245 } | 252 } |
| 246 | 253 |
| 247 } // namespace proxy | 254 } // namespace proxy |
| 248 } // namespace ppapi | 255 } // namespace ppapi |
| OLD | NEW |