| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 switch (source_handle.type) { | 364 switch (source_handle.type) { |
| 365 case gfx::SHARED_MEMORY_BUFFER: { | 365 case gfx::SHARED_MEMORY_BUFFER: { |
| 366 gfx::GpuMemoryBufferHandle handle; | 366 gfx::GpuMemoryBufferHandle handle; |
| 367 handle.type = gfx::SHARED_MEMORY_BUFFER; | 367 handle.type = gfx::SHARED_MEMORY_BUFFER; |
| 368 handle.handle = ShareToGpuProcess(source_handle.handle); | 368 handle.handle = ShareToGpuProcess(source_handle.handle); |
| 369 *requires_sync_point = false; | 369 *requires_sync_point = false; |
| 370 return handle; | 370 return handle; |
| 371 } | 371 } |
| 372 case gfx::IO_SURFACE_BUFFER: | 372 case gfx::IO_SURFACE_BUFFER: |
| 373 case gfx::SURFACE_TEXTURE_BUFFER: | 373 case gfx::SURFACE_TEXTURE_BUFFER: |
| 374 case gfx::OZONE_NATIVE_BUFFER: | 374 case gfx::OZONE_NATIVE_PIXMAP: |
| 375 *requires_sync_point = true; | 375 *requires_sync_point = true; |
| 376 return source_handle; | 376 return source_handle; |
| 377 default: | 377 default: |
| 378 NOTREACHED(); | 378 NOTREACHED(); |
| 379 return gfx::GpuMemoryBufferHandle(); | 379 return gfx::GpuMemoryBufferHandle(); |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 | 382 |
| 383 int32 GpuChannelHost::ReserveImageId() { | 383 int32 GpuChannelHost::ReserveImageId() { |
| 384 return next_image_id_.GetNext(); | 384 return next_image_id_.GetNext(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 459 |
| 460 listeners_.clear(); | 460 listeners_.clear(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 bool GpuChannelHost::MessageFilter::IsLost() const { | 463 bool GpuChannelHost::MessageFilter::IsLost() const { |
| 464 AutoLock lock(lock_); | 464 AutoLock lock(lock_); |
| 465 return lost_; | 465 return lost_; |
| 466 } | 466 } |
| 467 | 467 |
| 468 } // namespace content | 468 } // namespace content |
| OLD | NEW |