| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
| 10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 int32_t PpapiCommandBufferProxy::CreateGpuMemoryBufferImage( | 256 int32_t PpapiCommandBufferProxy::CreateGpuMemoryBufferImage( |
| 257 size_t width, | 257 size_t width, |
| 258 size_t height, | 258 size_t height, |
| 259 unsigned internalformat, | 259 unsigned internalformat, |
| 260 unsigned usage) { | 260 unsigned usage) { |
| 261 NOTREACHED(); | 261 NOTREACHED(); |
| 262 return -1; | 262 return -1; |
| 263 } | 263 } |
| 264 | 264 |
| 265 int32_t PpapiCommandBufferProxy::GetImageGpuMemoryBufferId(unsigned image_id) { | |
| 266 NOTREACHED(); | |
| 267 return -1; | |
| 268 } | |
| 269 | |
| 270 bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { | 265 bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { |
| 271 DCHECK(last_state_.error == gpu::error::kNoError); | 266 DCHECK(last_state_.error == gpu::error::kNoError); |
| 272 | 267 |
| 273 // We need to hold the Pepper proxy lock for sync IPC, because the GPU command | 268 // We need to hold the Pepper proxy lock for sync IPC, because the GPU command |
| 274 // buffer may use a sync IPC with another lock held which could lead to lock | 269 // buffer may use a sync IPC with another lock held which could lead to lock |
| 275 // and deadlock if we dropped the proxy lock here. | 270 // and deadlock if we dropped the proxy lock here. |
| 276 // http://crbug.com/418651 | 271 // http://crbug.com/418651 |
| 277 if (dispatcher_->SendAndStayLocked(msg)) | 272 if (dispatcher_->SendAndStayLocked(msg)) |
| 278 return true; | 273 return true; |
| 279 | 274 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 message->set_unblock(true); | 317 message->set_unblock(true); |
| 323 Send(message); | 318 Send(message); |
| 324 | 319 |
| 325 flush_info_->flush_pending = false; | 320 flush_info_->flush_pending = false; |
| 326 flush_info_->resource.SetHostResource(0, 0); | 321 flush_info_->resource.SetHostResource(0, 0); |
| 327 flushed_fence_sync_release_ = pending_fence_sync_release_; | 322 flushed_fence_sync_release_ = pending_fence_sync_release_; |
| 328 } | 323 } |
| 329 | 324 |
| 330 } // namespace proxy | 325 } // namespace proxy |
| 331 } // namespace ppapi | 326 } // namespace ppapi |
| OLD | NEW |