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 "content/common/gpu/client/gpu_channel_host.h" | 5 #include "content/common/gpu/client/gpu_channel_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 } | 364 } |
365 | 365 |
366 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess( | 366 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess( |
367 const gfx::GpuMemoryBufferHandle& source_handle, | 367 const gfx::GpuMemoryBufferHandle& source_handle, |
368 bool* requires_sync_point) { | 368 bool* requires_sync_point) { |
369 switch (source_handle.type) { | 369 switch (source_handle.type) { |
370 case gfx::SHARED_MEMORY_BUFFER: { | 370 case gfx::SHARED_MEMORY_BUFFER: { |
371 gfx::GpuMemoryBufferHandle handle; | 371 gfx::GpuMemoryBufferHandle handle; |
372 handle.type = gfx::SHARED_MEMORY_BUFFER; | 372 handle.type = gfx::SHARED_MEMORY_BUFFER; |
373 handle.handle = ShareToGpuProcess(source_handle.handle); | 373 handle.handle = ShareToGpuProcess(source_handle.handle); |
| 374 handle.offset = source_handle.offset; |
374 *requires_sync_point = false; | 375 *requires_sync_point = false; |
375 return handle; | 376 return handle; |
376 } | 377 } |
377 case gfx::IO_SURFACE_BUFFER: | 378 case gfx::IO_SURFACE_BUFFER: |
378 case gfx::SURFACE_TEXTURE_BUFFER: | 379 case gfx::SURFACE_TEXTURE_BUFFER: |
379 case gfx::OZONE_NATIVE_PIXMAP: | 380 case gfx::OZONE_NATIVE_PIXMAP: |
380 *requires_sync_point = true; | 381 *requires_sync_point = true; |
381 return source_handle; | 382 return source_handle; |
382 default: | 383 default: |
383 NOTREACHED(); | 384 NOTREACHED(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 | 525 |
525 listeners_.clear(); | 526 listeners_.clear(); |
526 } | 527 } |
527 | 528 |
528 bool GpuChannelHost::MessageFilter::IsLost() const { | 529 bool GpuChannelHost::MessageFilter::IsLost() const { |
529 AutoLock lock(lock_); | 530 AutoLock lock(lock_); |
530 return lost_; | 531 return lost_; |
531 } | 532 } |
532 | 533 |
533 } // namespace content | 534 } // namespace content |
OLD | NEW |